DButton.GetDrawBackground

From GMod Wiki

Jump to: navigation, search
Function
Syntax DButton:GetDrawBackground( )
Description:
returns the draw background state
Returns: Boolean
In Object: DButton
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DButton.GetDrawBackground]DButton.GetDrawBackground [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a button with a transparent background. When clicked the transparency will toggle between enabled and disabled.
Used onNewerClient.png
Code
// myParent = a panel
myButton = vgui.Create("DButton", myParent)
myButton:SetText("Transparent!")
myButton:SetDrawBackground(false)
myButton.DoClick = function (myButton) myButton:SetDrawBackground( !myButton:GetDrawBackgroud() ) end
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox