説明
リスト ボックス、タブ コントロール、コンボ ボックスなどのコントロール内の項目を指定します。 項目は次のようにして指定することができます。
- テキスト
(String)。
- インデックス
(Integer)。
- テキストとインデックスの組み合わせ
(String)。
文字列値は項目の名前を指定します。文字列には、ワイルドカード文字を含めることができます。
また、文字列として項目のインデックスを
"[n]" という形式で指定することもできます。ここで、n は項目のインデックス番号です。
例
次の例では、
ListBox 内の項目を選択する方法を示します。
listbox.select(0) ' Selects the first item, which has the index 0.
listbox.select("[0]") ' Also selects the first item.
listbox.select("apple") ' Selects the first item with text "apple".
listbox.select("apple[1]") 'Selects the second item with the text "apple".