DPropertySheet.SetDrawBackground

From GMod Wiki

Jump to: navigation, search
Function
Syntax DPropertySheet:SetDrawBackground( Bool draw )
Description:
Sets if the background should be drawn or not, true draws, false doesn't
Returns: Nil
In Object: DPropertySheet
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DPropertySheet.SetDrawBackground]DPropertySheet.SetDrawBackground [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()
 
	DermaPanel:SetDrawBackground( false ) //The background of the panel will now be transparent, this does NOT include the tabs, which wil draw as normal.
 
	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
 
 
OutputCreates a DFrame with a transparent DPropertySheet inside it.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox