Category:DHorizontalDivider

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

Creates an invisible vertical divider between two GUI elements.

Inherited Functions

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


Examples

Example

Insert a horizontal divider between two DPanels in a DFrame.

local f = vgui.Create( "DFrame" )
f:SetSize( 400, 200 )
f:Center()
f:MakePopup()

local LeftPanel = vgui.Create( "DPanel", f ) -- Can be any panel, it will be stretched
local RightPanel = vgui.Create( "DPanel", f )

local div = vgui.Create( "DHorizontalDivider", f )
div:Dock( FILL ) -- Make the divider fill the space of the DFrame
div:SetLeft( LeftPanel ) -- Set what panel is in left side of the divider
div:SetRight( RightPanel )
div:SetDividerWidth( 4 ) -- Set the divider width. Default is 8
div:SetLeftMin( 20 ) -- Set the Minimum width of left side
div:SetRightMin( 20 )
div:SetLeftWidth( 50 ) -- Set the default left side width


Personal tools
Navigation