DComboBox/AddChoice

From Garry's Mod
Jump to: navigation, search
 DComboBox:AddChoice( )

Contents

DescriptionPanelFunc

Adds a choice to the combo box.

Arguments

string value

The text show to the user.

Arguments

any data=nil

The data accompanying this string. If left empty, the value argument is used instead.

Can be accessed with the second argument of DComboBox:GetSelected, DComboBox:GetOptionData and as an argument of DComboBox:OnSelect.

Arguments

boolean select=false

Should this be the default selected text show to the user or not.

Arguments

Panel icon=nil

Adds an icon for this choice.

Returns

number

The index of the new option.
Personal tools
Navigation