Garry's Mod Wiki

DProperty_Combo:AddChoice

DProperty_Combo:AddChoice( string Text, any data, boolean select = false )

Description

Add a choice to your combo control.

Arguments

1 string Text
Shown text.
2 any data
Stored Data.
3 boolean select = false
Select this element?

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" )

Page Links


Special Pages


Wikis

?

Render Time: 82ms

DB GetPage 46
Generate Html 8
SaveChanges (1) 10
Render Body 0
Render Sidebar 16