2.00 Listbox
Lokasenna edited this page Jun 28, 2018
·
2 revisions
Provides a scrolling list of options, from which the user can select one or more.
z Element depth, used for hiding and disabling layers. 1 is the highest.
x, y Coordinates of top-left corner
w, h Width and height of the text editor
list Accepts either a comma-separated string of options or a table
If you change the list at run-time using a comma-separated string,
you'll need to call GUI.elms.my_list:init() afterward to have the
string parsed into a table.
multi Boolean. Can the user select multiple items (Ctrl, Shift)?
caption Label shown to the left of the text editor
pad Padding between the label and the text editor
cap_bg Color to be drawn underneath the label. Defaults to "wnd_bg"
bg List background. Defaults to "elm_bg"
shadow Boolean. Draw a shadow beneath the label?
color Text color
font_a Caption font
font_b List font
Returns either a single item number (multi = false), or a table (multi = true) with the indices of each selected item.
Accepts a table of boolean values for items to be selected or not selected.
If your script needs to resize the listbox, move it around, etc, run this afterward so it can update a few internal values.
Introduction
- 1. Getting started
- 2. Parts of a basic script
- 3. How it works
- 4. Fonts and colors
- 5. Element methods
Elements
- 1. Button
- 2. Frame
- 3. Knob
- 4. Label
- 5. Listbox
- 6. Menubar
- 7. Menubox
- 8. Options
- 9. Slider
- 10. Tabs
- 11. Textbox
- 12. TextEditor
- 13. Window
Core functions
- 1. Element creation
- 2. GUI variables
- 3. Script hooks
- 4. Table functions
- 5. Text functions
- 6. Color functions
- 7. Math and Logic functions
- 8. Graphics functions
- 9. Element functions
Additional documentation