ComboBox¶
The GenericUI_Element_ComboBox
element implements a combobox form element. The user may change its value to any labelled one from a predefined list.
You can set its options with SetOptions()
or AddOption()
. Comboboxes contain no options by default.
GenericUI_Element_ComboBox Class¶
Inherits from GenericUI_Element
.
Methods¶
AddOption¶
Adds an option to the combobox.
@param id string
@param label string
ClearOptions¶
Removes all options from the combobox.
GetOptions¶
Returns the available options.
IsOpen¶
Returns whether the combobox is open.
SelectOption¶
Sets the currently selected option.
@param id string
SetOpenUpwards¶
Sets whether the combobox should open upwards, or downwards (default)
Use to determine the orientation of the options selector when opened.
@param openUpwards boolean
SetOptions¶
Sets the options for the combobox. Equivalent to calling ClearOptions()
then AddOption()
for each option in the list passed.
@param options GenericUI_Element_ComboBox_Option[]