Difference between revisions of "GUIComboBox"
From Virtual World Web Wiki
(Documentation for the GUIComboBox class) |
(Documentation for the GUIComboBox class) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | * '''Inherits class: [[GUIDropdownComponent]]''' | + | Component representing a dropdown list of options to choose from |
+ | |||
+ | *'''Inherits class: [[GUIDropdownComponent]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
===Remarks <nowiki>[</nowiki>[{{fullurl:GUIComboBox Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ===Remarks <nowiki>[</nowiki>[{{fullurl:GUIComboBox Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ||
− | {{:GUIComboBox Remarks}} | + | {{#ifexist:GUIComboBox Remarks|{{:GUIComboBox Remarks}}|}} |
===Properties=== | ===Properties=== | ||
:{{CSharp|int SelectedIndex {get; set;} }} | :{{CSharp|int SelectedIndex {get; set;} }} | ||
+ | :: | ||
+ | ::The index of the item in the dropdown list that is selected (or -1 for none) | ||
− | :{{CSharp| | + | :{{CSharp|GUISelectableComponent SelectedItem {get;} }} |
+ | :: | ||
+ | ::Which item is selected in the dropdown list | ||
:{{CSharp|bool UpdateLabel {get; set;} }} | :{{CSharp|bool UpdateLabel {get; set;} }} | ||
+ | :: | ||
+ | ::Should the button's label automatically update with the text of the selected option | ||
===Events=== | ===Events=== | ||
− | :{{CSharp|OnSelect( | + | :{{CSharp|OnSelect()}} |
+ | :: | ||
+ | ::Event fired when one of the options is selected | ||
===Methods=== | ===Methods=== | ||
− | :{{CSharp|GUIComponent AddItem(string itemName)}} | + | :{{CSharp|GUIComponent AddItem(string itemName, string template {{=}} NULL)}} |
+ | :: | ||
+ | ::Adds an item to the dropdown menu, optionally specifying a particular template | ||
:{{CSharp|void ClearItems()}} | :{{CSharp|void ClearItems()}} | ||
− | + | :: | |
− | : | + | ::Remove all items from this component |
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Latest revision as of 14:26, 15 January 2018
Component representing a dropdown list of options to choose from
- Inherits class: GUIDropdownComponent
- This is a JavaScript visible object
Remarks [edit]
Properties
- int SelectedIndex {get; set;}
- The index of the item in the dropdown list that is selected (or -1 for none)
- GUISelectableComponent SelectedItem {get;}
- Which item is selected in the dropdown list
- bool UpdateLabel {get; set;}
- Should the button's label automatically update with the text of the selected option
Events
- OnSelect()
- Event fired when one of the options is selected
Methods
- GUIComponent AddItem(string itemName, string template = NULL)
- Adds an item to the dropdown menu, optionally specifying a particular template
- void ClearItems()
- Remove all items from this component