DButton.SetDrawBackground

From GMod Wiki

Jump to: navigation, search
Function
Syntax DButton:SetDrawBackground( Boolean draw )
Description:
Switches on and off drawing of the buttons background.
Returns: nil
In Object: DButton
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DButton.SetDrawBackground]DButton.SetDrawBackground [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.DoClick = function (myButton) myButton:SetDrawBackground( !myButton:GetDrawBackgroud() ) end
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox