Category:DPropertySheet

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

A tab oriented control where you can create multiple tabs with items within. Used mainly for organization.

Inherited Functions

Inherits the following functions from DPanel and its parents up to 3 levels deep:


Examples

Example

Example of how you'd create and use this panel.

local frame = vgui.Create( "DFrame" )
frame:SetSize( 500, 300 )
frame:Center()
frame:MakePopup()

local sheet = vgui.Create( "DPropertySheet", frame )
sheet:Dock( FILL )

local panel1 = vgui.Create( "DPanel", sheet )
panel1.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 0, 128, 255, self:GetAlpha() ) ) end 
sheet:AddSheet( "test", panel1, "icon16/cross.png" )

local panel2 = vgui.Create( "DPanel", sheet )
panel2.Paint = function( self, w, h ) draw.RoundedBox( 4, 0, 0, w, h, Color( 255, 128, 0, self:GetAlpha() ) ) end 
sheet:AddSheet( "test 2", panel2, "icon16/tick.png" )


Personal tools
Navigation