-
Notifications
You must be signed in to change notification settings - Fork 11
ComboBox
ben-sangster edited this page Nov 10, 2010
·
2 revisions
Drop down menu class.
currentIndexChanged (int index)
int count ()
- Returns the total number of options in the combobox.
int currentIndex ([Number index])
- Returns the index of the currently selected option.
- If an argument was specified, sets the combo box to that index and returns the new index.
String currentText ([String text])
- Returns the text of the currently selected option.
- If text that is already in the combo box is specified as an argument, sets the combo box to that index and returns the text of the new index.
void addItem (String label)
- Add label to the combobox.
void addItems (String[] labels)
- Adds an array of strings to the combobox.
int findText (String text)
-
Finds the index in the combobox of text.
-
Returns -1 if text is not present.
String itemText (int index)
- Returns the text of the item at index.
void removeIndex (int index)
- Remove the item at index from the combobox.
void clear ()
- Remove all items from the combobox.