Garry's Mod Wiki

Revision Difference

DFrame#516721

<panel>⤶ <parent>EditablePanel</parent>⤶ <description>The DFrame control is the foundation for any Derma menu. It holds all of your controls.</description>⤶ <hooks>|File=lua/vgui/dframe.lua</hooks>⤶ ⤶ </panel>⤶ <panel⤶ |parent=editablepanel⤶ |description=the dframe control is the foundation for any derma menu. it holds all of your controls.|hooks=>⤶ <file>lua/vgui/dframe.lua</file>⤶ ⤶ </panel⤶ |parent=editablepanel⤶ |description=the dframe control is the foundation for any derma menu. it holds all of your controls.⤶ |hooks=>⤶ <example> <description>Creates a DFrame.</description> <code> local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( 100, 100 ) DermaPanel:SetSize( 300, 200 ) DermaPanel:SetTitle( "My new Derma frame" ) DermaPanel:SetDraggable( true ) DermaPanel:MakePopup() </code> </example> <example> <description>Creates a DFrame with only close button.</description> <code> local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( 100, 100 ) DermaPanel:SetSize( 300, 200 ) DermaPanel:SetTitle( "My new Derma frame" ) DermaPanel:SetDraggable( true ) DermaPanel:MakePopup() DermaPanel.btnMinim:SetVisible(false) DermaPanel.btnMaxim:SetVisible(false) </code> </example> <example> <description>Creates a DFrame with custom title color.</description> <code> local DermaPanel = vgui.Create( "DFrame" ) DermaPanel:SetPos( 100, 100 ) DermaPanel:SetSize( 300, 200 ) DermaPanel:SetTitle( "My new Derma frame" ) DermaPanel:SetDraggable( true ) DermaPanel:MakePopup() DermaPanel.lblTitle.UpdateColours = function( label ) label:SetTextStyleColor( color_green ) end </code> </example>