SpringGUI

introduction    download    reference    examples    faq


Reference

Name

addList()

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 1"); // select the first item in the List
}

Description

Creates a List element. A List is a selection box that enables the user to choose between several items that you add to it. You can specify whether only one item or several items can be selected at a time.

Syntax

gui.addList(name, x, y, width, height);

Parameters

String name The name of the element. You can query and change the element's attributes later on by referring to this name.
int x, int y The x and y coordinates of the element's top left point.
int width, int height The size of the element.

Returns

nothing

Related

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


back to the top of the page


tinkering with codetools and docsscrapbookabout