SpringGUI

introduction    download    reference    examples    faq


Reference

Name

removeItem()

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.removeItem("myList", "option 2"); // remove the second item from the List
}

Description

Removes an item from a List or Choice element. If several items have the same value, this will take the first item by that value.

Syntax

gui.removeItem(name, item);

Parameters

String name The name of the List or Choice element.
String item The item to remove.

Returns

true if the element can be found and is either a Choice or a List element. False otherwise.

Related

addItem()
hasItem()
getItemCount()
getItemByIndex()
isListMultipleMode(), setListMultipleMode()
getSelectedItem() / getSelectedItems()
selectItem()
addChoice()
addList()
table of events


back to the top of the page


tinkering with codetools and docsscrapbookabout