Garry's Mod Wiki

Garry's Mod Wiki

  Panel, Panel DForm:ComboBox( string title, string convar )


Adds a DComboBox onto the DForm


1 string title
Text to the left of the combo box
2 string convar
Console variable to change when the user selects something from the dropdown.


1 Panel
The created DComboBox
2 Panel
The created DLabel


local frame = vgui.Create( "DFrame" ) frame:SetSize( ScrW() / 2, ScrH() / 2 ) frame:MakePopup() local form = frame:Add("DForm") form:Dock( FILL ) form:DockMargin( 5, 5, 5, 5 ) local combobox, label = form:ComboBox( "test", "sv_accelerate" ) combobox:AddChoice( "10" ) -- 10 will be used as convar value combobox:AddChoice( "1000", 100 ) -- 100 will be used as convar value

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...