DCheckBox
Description
The DCheckBox is a checkbox. It allows you to get a boolean value from the user (true/false - yes/no)
Parent
Derives methods, etc not listed on this page from DButton.
Methods
boolean DCheckBox:IsEditing()
Returns whether the state of the checkbox is being edited. This means whether the user is currently clicking (mouse-down) on the checkbox, and applies to both the left and right mouse buttons.
DCheckBox:SetChecked( boolean checked )
Sets the checked state of the checkbox. Does not call the checkbox's DCheckBox:OnChange and Panel:ConVarChanged methods, unlike DCheckBox:SetValue.
DCheckBox:SetValue( boolean checked )
Sets the checked state of the checkbox, and calls the checkbox's DCheckBox:OnChange and Panel:ConVarChanged methods.
DCheckBox:Toggle()
Toggles the checked state of the checkbox, and calls the checkbox's DCheckBox:OnChange and Panel:ConVarChanged methods. This is called by DCheckBox:DoClick.
Example
Creates a DCheckBox and sets its initial value.