Garry's Mod Wiki

DForm

Description

An easy form with functions to quickly add form elements

Parent

Derives from DCollapsibleCategory.

Methods

DForm:AddItem( Panel left, Panel right = nil )
Adds one or two items to the DForm. If this method is called with only one argument, it is added to the bottom of the form. If two arguments are passed, they are placed side-by-side at the bottom of the form. Internally, this function is used by the various DForm functions to, for example, add labels to the left of buttons.
Panel DForm:Button( string text, string concmd, vararg concmd args )
Adds a DButton onto the DForm
Panel DForm:CheckBox( string label, string convar )
Adds a DCheckBoxLabel onto the DForm. This will run DCheckBoxLabel:OnChange when being added. This is caused by Panel:SetConVar being used when this function is used. To avoid this, use DForm:AddItem with a DCheckBoxLabel.
Panel, Panel DForm:ComboBox( string title, string convar )
Adds a DComboBox onto the DForm
Panel DForm:ControlHelp( string help )
Adds a DLabel onto the DForm. Unlike DForm:Help, this is indented and is colored blue, depending on the derma skin.
Panel DForm:Help( string help )
Adds a DLabel onto the DForm as a helper
Panel, Panel DForm:ListBox( string label )
Adds a DListBox onto the DForm We advise against using this. It may be changed or removed in a future update. Use DListView with DForm:AddItem instead.
Panel, Panel DForm:NumberWang( string label, string convar, number min, number max, number decimals = nil )
Adds a DNumberWang onto the DForm
Panel DForm:NumSlider( string label, string convar, number min, number max, number decimals = nil )
Adds a DNumSlider onto the DForm
Panel DForm:PanelSelect()
We advise against using this. It may be changed or removed in a future update. This is derived from the deprecated DPanelSelect. Creates a DPanelSelect and docks it to the top of the DForm.
DForm:Rebuild()
We advise against using this. It may be changed or removed in a future update. Does nothing.
DForm:SetName( string name )
Sets the title (header) name of the DForm. This is Label until set.
Panel, Panel DForm:TextEntry( string label, string convar )
Adds a DTextEntry to a DForm

Methods

Page Links


Special Pages


Wikis

?

Render Time: 96ms

DB GetPage 22
Generate Html 14
SaveChanges (1) 38
Render Body 0
Render Sidebar 19