DProperty Combo/AddChoice

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

Contents

DescriptionPanelFunc

Add a choice to your combo control.

Arguments

string Text

Shown text.

Arguments

any data

Stored Data.

Arguments

boolean select=false

Select this element?

Examples

Example

Set the "I am selected" option selected.

local choice = DP:CreateRow( "Choices", "Hello world" )
choice:Setup( "Combo" )
choice:AddChoice( "I am a choice", {} )
choice:AddChoice( "I am selected", 8, true )
choice:AddChoice( "I am not selected", "Hello world" )


Personal tools
Navigation