Panel.SetSkin

From GMod Wiki

Jump to: navigation, search
Function
Syntax Panel:SetSkin( )
Description:
Sets the skin of the panel.
Returns: String
In Object: Panel
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Panel.SetSkin]Panel.SetSkin [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreates a basic DFrame and sets the skin.
Used onNewerClient.png
Code
 
local DermaPanel = vgui.Create( "DFrame" ) -- Creates the frame itself
DermaPanel:SetSize( ScrW( ) / 2, ScrH( ) / 2 ) -- Size of the frame ( use half the width / height of your screen )
DermaPanel:Center( ) -- Center the frame on the screen
DermaPanel:SetTitle( "My Derma Frame!") -- Title of the frame
DermaPanel:SetSkin("MyExampleSkin") -- Setting the skin of the panel.
DermaPanel:SetVisible( true )
DermaPanel:MakePopup( ) -- Show the frame
 
OutputCreates a basic DFrame, sets the size with a title and applies a Derma skin to it.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox