Garry's Mod Wiki

DForm:CheckBox

  Panel DForm:CheckBox( string label, string convar )

Description

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.

Arguments

1 string label
The label to be set next to the check box
2 string convar
The console variable to change when this is changed

Returns

1 Panel
The created DCheckBoxLabel