Garry's Mod Wiki

DProperty_Combo:Setup

DProperty_Combo:Setup( string prop = "Combo", table data = { text = 'Select...' } )

Description

Sets up a combo control.

Arguments

1 string prop = "Combo"
The name of DProperty sub control to add.
2 table data = { text = 'Select...' }
Data to use to set up the combo box control.

Structure:

  • string text - The default label for this combo box
  • table values - The values to add to the combo box

Example

Setup a Combo control with a custom default text and two options.

local Combo = DP:CreateRow( "Catergory", "Hello World" ) Combo:Setup( "Combo", { text = "Select me!", values = { [ "Label 1" ] = "data 1", [ "Label 2" ] = 2, } } )

Page Links


Special Pages


Wikis

?

Render Time: 32ms

DB GetPage 3
Generate Html 7
SaveChanges (1) 8
Render Body 0
Render Sidebar 11