|
SpringGUI
introduction download reference examples faq
Reference
Name
|
selectItem()
|
Examples
|
SpringGUI gui;
void setup() {
size(200,200);
gui = new SpringGUI(this); // initialise SpringGUI
// Create a List named "myList" at coordinates 10,10 with width 200px and height 100px...
gui.addList("myList", 10, 10, 200, 100);
gui.addItem("myList", "option 1"); // add an item to the List
gui.addItem("myList", "option 2"); // add an item to the List
gui.selectItem("myList", "option 2"); // select the second item in the List
}
|
Description
|
Selects an item in a List or Choice element. If several items have the same value, this will take the first item by that value.
|
Syntax
|
gui.selectItem(name, item);
|
Parameters
|
String name
|
The name of the List or Choice element.
|
String item
|
The item to select.
|
|
Returns
|
true if the element can be found, is either a Choice or a List element and has the specified item. False otherwise.
|
Related
|
addItem()
hasItem()
removeItem()
getItemCount()
getItemByIndex()
isListMultipleMode(), setListMultipleMode()
getSelectedItem() / getSelectedItems()
addChoice()
addList()
table of events
|
back to the top of the page
|
| |
| | |