DPropertySheet.GetDrawBackground

From GMod Wiki

Jump to: navigation, search
Function
Syntax DPropertySheet:GetDrawBackground( )( )
Description:
Returns true if the background is drawn and false if the background is transparent
Returns: Bool
In Object: DPropertySheet
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DPropertySheet.GetDrawBackground]DPropertySheet.GetDrawBackground [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a DPropertySheet and checks if the background is opaque or transparent
Used onNewerClient.png
Code
 
	local DermaPanel = vgui.Create( "DFrame" )
	DermaPanel:SetPos( 50, 50 )
	DermaPanel:SetSize( 350, 400 )
	DermaPanel:SetTitle( "Testing Derma Stuff" )
	DermaPanel:SetVisible( true )
	DermaPanel:SetDraggable( false )
	DermaPanel:ShowCloseButton( true )
	DermaPanel:MakePopup()
 
	print( tostring(DermaPanel:GetDrawBackground()) ) //This will print "false" in the console
 
	local PropertySheet = vgui.Create( "DPropertySheet", DermaPanel )
	PropertySheet:SetPos( 5, 30 )
	PropertySheet:SetSize( 340, 315 )
 
	local SheetItemOne = vgui.Create( "DCheckBoxLabel" )
	SheetItemOne:SetText( "Use Props?" )
	SheetItemOne:SetConVar( "some_convar" )
	SheetItemOne:SetValue( 1 )
	SheetItemOne:SizeToContents()
 
	local sheet1 = PropertySheet:AddSheet( "Tab 1", SheetItemOne, "gui/silkicons/user", false, false, "Tooltip 1" )
end
 
 
OutputPrints "false" in console


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox