Skip to content

combobox

Represents menu combobox

Methods

get_value: string / { string, ... }

Returns combobox value (or a table of values if it's a multiselect)

1
2
local dd_v = dd:get_value() -- a string (dd = dropdown)
local ms_v = ms:get_value() -- a table (ms = multiselect)

set_value(...)

Type Name Description Default
string / { string, ... } ... Value(s) to set none

Sets combobox value (or a table of values if it's a multiselect)

1
2
dd:set_value('Example')                         -- dd = dropdown
ms:set_value('Value 1', 'Value 2', 'Value N')   -- ms = multiselect

set_callback(fn)

Type Name Description Default
function() fn Callback none

Sets callback to current control that's being called on value change

1
2
3
my_element:set_callback(function()
    print('Changed!')
end)

set_tooltip(txt)

Type Name Description Default
string txt Text to set none

Sets tooltip text. Works only for script-created elements!

1
my_element:set_tooltip('This is big function!')