-
-
Couldn't load subscription status.
- Fork 28
ComboBox
coding.jackalope edited this page Feb 24, 2019
·
4 revisions
#####Table of Contents
A combo box allows the user to select a single item from a list and display the selected item in the combo box. The list is only visible when the user is interacting with the control.
local Fruits = {"Apple", "Banana", "Orange", "Pear", "Lemon"}
local Selected = ""
Slab.BeginWindow('MyFirstWindow', {Title = "My First Window"})
if Slab.BeginComboBox('MyComboBox', {Selected = Selected}) then
for I, V in ipairs(Fruits) do
if Slab.TextSelectable(V) then
Selected = V
end
end
Slab.EndComboBox()
end
Slab.EndWindow()
There are a few options which can be configured to change the behavior of the Combo Box control.
| Option | Type | Description |
|---|---|---|
| Tooltip | String | Text that is rendered when the user hovers over this combo box. |
| Selected | String | Text that is displayed in the non-editable input box for this combo box. |