PIXEL.ComboBox
- Base panel:
PIXEL.TextButton - Source: cl_combo_box.lua (opens in a new tab)
- Description: PIXEL combo box (dropdown) control.
Methods
The following methods are available on the PIXEL.ComboBox panel:
PANEL:Clear()Clears all combo box choices and selection state.
string PANEL:GetOptionText( number )Returns display text for a choice by index.
any PANEL:GetOptionData( number )Returns associated data for a choice by index.
any PANEL:GetOptionTextByData( any )Resolves display text for a matching data value.
PANEL:ChooseOption( string, number )Selects a choice and updates displayed value.
PANEL:ChooseOptionID( number )Selects a choice by index.
number PANEL:GetSelectedID()Returns the selected choice index.
string, any PANEL:GetSelected()Returns the currently selected text and data.
boolean PANEL:IsMenuOpen()Returns whether the dropdown menu is currently open.
PANEL:CloseMenu()Closes and removes the dropdown menu if open.
PANEL:CheckConVarChanges()Synchronizes displayed value from the bound console variable.