SpringGUI

introduction    download    reference    examples    faq


Reference

Name

getItemCount()

Examples

// removes all items from a List.
int num = gui.getItemCount("myList");
for (int i=0; i<num; i++) {
  // get the first item in the List
  String item = gui.getItemByIndex("myList",0);
  gui.removeItem("myList", item); // remove it.
}

Description

Returns the number of items in a List or Choice element.

Syntax

int num = gui.getItemCount(name);

Parameters

String name The name of the List or Choice element.

Returns

The number of items in the element if the element can be found and is either a Choice or a List. -1 otherwise.

Related

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


back to the top of the page


tinkering with codetools and docsscrapbookabout