Base class for all list-of-widgets widgets. Fires OnInsertItem, OnRemoveItem and OnSelectItem events.
Inherits from: Widget
Lua full name: lysa.ui.List
|
| integer | add_item (item: Widget, alignment: integer, resource: string) |
| | Adds a widget at the end of the list and returns its 0-based index. More...
|
| |
| nil | remove_item (index: integer) |
| | Removes the item at the given 0-based index. More...
|
| |
| nil | remove_all_items () |
| | Removes all items from the list. More...
|
| |
| Widget | get_item (index: integer) |
| | Returns the widget at the given 0-based index. More...
|
| |
| nil | select (index: integer) |
| | Selects the item at the given index; pass NO_SELECTION to clear the selection. More...
|
| |
|
| integer | NO_SELECTION |
| | Sentinel value returned by selected_index when nothing is selected.
|
| |
| integer | count |
| | Number of items currently in the list. (read-only)
|
| |
| integer | selected_index |
| | Index (0-based) of the selected item, or NO_SELECTION if nothing is selected. (read-only)
|
| |
| Widget|nil | selected_item |
| | The currently selected widget, or nil. (read-only)
|
| |