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.
Implements
Implements or overrides the following hooks/methods. If you want to override these, you probably want to call the original function too.
Events
Methods
DCheckBox:DoClick()
Calls DCheckBox:Toggle
boolean DCheckBox:GetChecked()
An AccessorFunc that gets the checked state of the checkbox.
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 )
An AccessorFunc that sets the checked state of the checkbox. Does not call the checkbox's DCheckBox:OnChange and Panel:ConVarChanged methods, unlike DCheckBox:SetValue.
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. DCheckBox:DoClick is an alias of this function.
Example
Creates a DCheckBox and sets its initial value.
Output: