SelectInput
Constructors
new
SelectInput
Description
Creates a new SelectInput control.
Members
length
Description
Gets the amount of options currently on the select input.
selectedIndex
Description
Gets or sets the selected item from the options available.
Methods
addItem(option)
Description
Adds an item to the select input as an option, this is added to the end of the options list.
Parameters
Name | Type | Description |
---|---|---|
option | string | The text title of the option the user may select. |
addItemAtIndex(option, index)
Description
Adds an item to the select input as an option, the item is inserted at the index.
Parameters
Name | Type | Description |
---|---|---|
option | string | The text title of the option the user may select. |
index | number | The index (from 0 to length-1) of where to add the option. |
item(index)
Description
Returns the text title for the item at the specified index.
Parameters
Name | Type | Description |
---|---|---|
index | number | The index used to get the items information. |
Returns
Type | Description |
---|---|
string |
removeItem(option)
Description
Removes the option where the text title matches the passed in value.
Parameters
Name | Type | Description |
---|---|---|
option | string | The text title of the option to be removed. |
removeItemAtIndex(index)
Description
Removes the item at the specified index.
Parameters
Name | Type | Description |
---|---|---|
index | number | The index (from 0 to length-1) of the item to remove. |