DCheckBoxLabel

From GMod Wiki

Jump to: navigation, search
Derma Control: DCheckBoxLabel
Parent Class:DPanel
Subclasses:
Description:
Simple Checkbox

Examples

DescriptionCreates a checkbox on a panel with a label.
Used onNewerClient.png
Code
// 
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 250 )
DermaPanel:SetTitle( "Testing Derma Stuff" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
 
local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
CheckBoxThing:SetPos( 10,50 )
CheckBoxThing:SetText( "Show FPS ?" )
CheckBoxThing:SetConVar( "cl_showfps" ) -- ConCommand must be a 1 or 0 value
CheckBoxThing:SetValue( 1 )
CheckBoxThing:SizeToContents() -- Make its size to the contents. Duh?
 
OutputDCheckBoxLabel.PNG


Methods

NewerClient.png DCheckBoxLabel.SizeToContents
NewerClient.png DCheckBoxLabel.SetText
NewerClient.png DCheckBoxLabel.GenerateExample
NewerClient.png DCheckBoxLabel.GetIndent
NewerClient.png DCheckBoxLabel.Paint
NewerClient.png DCheckBoxLabel.SetConVar
NewerClient.png DCheckBoxLabel.Init
NewerClient.png DCheckBoxLabel.SetIndent
NewerClient.png DCheckBoxLabel.PerformLayout
NewerClient.png DCheckBoxLabel.OnChange
NewerClient.png DCheckBoxLabel.SetChecked
NewerClient.png DCheckBoxLabel.GetChecked
NewerClient.png DCheckBoxLabel.SetTextColor
NewerClient.png DCheckBoxLabel.Toggle
NewerClient.png DCheckBoxLabel.SetValue

Inherited from DPanel

NewerClient.png DPanel.SetDisabled
NewerClient.png DPanel.GetPaintBackground
NewerClient.png DPanel.GetDisabled
NewerClient.png DPanel.SetPaintBackground
NewerClient.png DPanel.ApplySchemeSettings

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox