π¦ Functions
SetStyleSheet
MyComboBox:SetStyleSheet(ComboBoxStyle)
GetStyleSheet
β Returns ComboBoxStyle.
local ret = MyComboBox:GetStyleSheet()
SetText
MyComboBox:SetText(Text)
MyComboBox:SetCustomMenu(Widget)
β Returns BaseWidget.
local ret = MyComboBox:GetCustomMenu()
AddOption
MyComboBox:AddOption(Option)
RemoveOption
MyComboBox:RemoveOption(Option)
SetOptions
MyComboBox:SetOptions(Options)
GetOptions
β Returns table<integer, string>.
local ret = MyComboBox:GetOptions()
RefreshOptions
MyComboBox:RefreshOptions()
AddSelectedOption
MyComboBox:AddSelectedOption(Option)
RemoveSelectedOption
MyComboBox:RemoveSelectedOption(Option)
GetSelectedOptions
β Returns table<integer, string>.
local ret = MyComboBox:GetSelectedOptions()
SetMultiSelect
MyComboBox:SetMultiSelect(MultiSelect)
GetMultiSelect
β Returns boolean.
local ret = MyComboBox:GetMultiSelect()
SetFont
MyComboBox:SetFont(FontName?, Typeface?, FontSize?)
GetFont
β Returns table.
local ret = MyComboBox:GetFont()
SetTextColor
MyComboBox:SetTextColor(Color)
π Events
Triggered when the menu needs to refresh.
MyComboBox:BindDispatcher("OnMenuRefresh", function()
-- On Menu Refresh was called
end)
On Selection Changed
Triggered when the selection changed
MyComboBox:BindDispatcher("OnSelectionChanged", function(self, SelectedOption)
-- On Selection Changed was called
end)