|
SpringGUI
introduction download reference examples faq
Reference
Name
|
addItem()
|
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
}
|
Description
|
Adds (appends) an item to a List or Choice element.
|
Syntax
|
gui.addItem(name, item);
|
Parameters
|
String name
|
The name of the List or Choice element.
|
String item
|
The item to add.
|
|
Returns
|
true if the element can be found and is either a Choice or a List element. False otherwise.
|
Related
|
removeItem()
hasItem()
getItemCount()
getItemByIndex()
isListMultipleMode(), setListMultipleMode()
getSelectedItem() / getSelectedItems()
selectItem()
addChoice()
addList()
table of events
|
back to the top of the page
|
| |
| | |