Garry's Mod Wiki

Garry's Mod Wiki

  DProperty_Combo:Setup( table data = { text = 'Select...' } )


This is used internally - although you're able to use it you probably shouldn't.

Sets up a combo control.


1 table data = { text = 'Select...' }
Data to use to set up the combo box control. See Editable Entities.


  • string text - The default label for this combo box
  • table values - The values to add to the combo box. Keys are the "nice" text, values are the data value to send.
  • table icons - The icons for each value. They will be matched by key name.
  • boolean select - The "nice" name/key of the value that should be initially selected.


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

-- CreateRow returns an internal panel with its own Setup method, which calls this setup method. local Combo = DP:CreateRow( "Catergory", "Hello World" ) Combo:Setup( "Combo", { text = "Select me!", values = { [ "Label 1" ] = "data 1", [ "Label 2" ] = 2, } } )

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...