Skip to main content

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

listbox

Properties

PropertyDescription
Multi SelectWhether supports Multiple selections.
Node Item HeightDisplay the height of items.
Background Color Of Selected TextThe background color of the selected text.
Background Image When SelectedThe background image displayed when selected.

Events

addCallBack1

Callback NameCallback Function
on_select_changedThe 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