ComboBox
Updated for version 3.37.
It's recommended to first read about the base item before reading about other items https://luffyyy.gitbook.io/beardlib/menuui/menuui-item
ComboBox
Creation
Parameters
Parameter | Type | Description |
---|---|---|
items | Table | The items of the ComboBox, can be like: |
value | Any | Index/Key of the selected item, if free_typing is enabled can be a string |
free_typing | Boolean | Should the combobox act as a textbox? This means the values will save even if it's not inside the items, calling Item:Value() or item.value will not always return an index |
items_uppercase | Boolean | Makes all items' text capitalized |
items_lowercase | Boolean | Makes all items' text non-capitalized |
Functions
Get
Function | Return Type | Description |
---|---|---|
Value() | Any | Returns the index/key of the selected item |
SelectedItem() | Any | Returns the currently selected items or if free_typing is enabled the value written |
Set
Function | Description |
---|---|
SetItems(Table items) | Sets the items of the ComboBox, items being the new items |
SetValue(Number value, Boolean run_callback, Boolean no_items_clbk) | Sets the value of the item. |
SetSelectedItem(Some item, Boolean run_callback, Boolean no_items_clbk) | Sets the selected item or if free_typing is enabled sets the value. Note: |
Other
Function | Description |
---|---|
Clear() | Clears all items |
Append(Any item) | Appends an item to the items list |
Prepend(Any item) | Prepends an item to the items list |
RefreshList() | Refreshes the list |
Last updated