ListBox
ListBox shows multiple text information in a list. A Scroll Bar will be available to facilitate your view when a certain number of text items occur.
- ListBox
Properties
Property | Description |
---|---|
Multi Select | Whether supports Multiple selections. |
Node Item Height | Display the height of items. |
Background Color Of Selected Text | The background color of the selected text. |
Background Image When Selected | The background image displayed when selected. |
Events
Callback Name | Callback Function |
---|---|
on_select_changed | The callback when the node cell selected is changed. |
Lua Script Example
local list_data =
{
"ListItem1",
"ListItem2",
"ListItem3"
}
if #list_data > 0 then
for i = 1, #list_data, 1 do
list_box:AddString(nx_widestr(list_data[i]))
end
end
-- After the ListBox option is changed, the callback function list_box_select_changed will be executed.
function list_box_select_changed(self)
local value = self.SelectString
nx_msgbox(nx_string(value))
end