DHorizontalDivider

From GMod Wiki

Revision as of 20:51, 9 November 2011 by TheFreeman193 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Derma Control: DHorizontalDivider
Parent Class:DPanel
Subclasses:None
Description:
Creates a divider, that can be dragged, between objects.

Examples

DescriptionCreates a divider between a Button and a ComboBox.
Used onNewerClient.png
Code
function DividerTest()
 
	local Frame = vgui.Create("DFrame") //Create a Frame to test the Divider.
	Frame:SetPos(10,10)
	Frame:SetSize(300,300)
	Frame:SetTitle("Divider Test")
	Frame:SetSizable(false)
 
		local Clicker = vgui.Create("DButton", Frame) //A button.
		Clicker:SetText("Clicker")
 
		local ComboBox = vgui.Create("DComboBox", Frame) //A combo box
 
		local Divider = vgui.Create("DHorizontalDivider", Frame) //Create our divider.
		Divider:SetPos(4, 27) //Set the top left corner of the divider
		Divider:SetSize(292, 269) //Set the overall size of the divider
                //Set the starting width of the left item, the right item will be scaled appropriately.
		Divider:SetLeftWidth(142)
		Divider:SetLeft(Clicker) //Set the item that will be on the left.
		Divider:SetRight(ComboBox) //Set the item that will be on the right.
		Divider:SetDividerWidth(4) //Set the width of the dividing bar.
 
end
 
concommand.Add("TestingDivider", DividerTest)
Outputet9q35.png


Methods

NewerClient.png DHorizontalDivider.GenerateExample
NewerClient.png DHorizontalDivider.GetDividerWidth
NewerClient.png DHorizontalDivider.GetDragging
NewerClient.png DHorizontalDivider.GetHoldPos
NewerClient.png DHorizontalDivider.GetLeft
NewerClient.png DHorizontalDivider.GetLeftMin
NewerClient.png DHorizontalDivider.GetLeftWidth
NewerClient.png DHorizontalDivider.GetMiddle
NewerClient.png DHorizontalDivider.GetRightMin
NewerClient.png DHorizontalDivider.GetRigth
NewerClient.png DHorizontalDivider.Init
NewerClient.png DHorizontalDivider.LoadCookies
NewerClient.png DHorizontalDivider.OnCursorMoved
NewerClient.png DHorizontalDivider.OnMouseReleased
NewerClient.png DHorizontalDivider.PerformLayout
NewerClient.png DHorizontalDivider.SetDividerWidth
NewerClient.png DHorizontalDivider.SetDragging
NewerClient.png DHorizontalDivider.SetHoldPos
NewerClient.png DHorizontalDivider.SetLeft
NewerClient.png DHorizontalDivider.SetLeftMin
NewerClient.png DHorizontalDivider.SetLeftWidth
NewerClient.png DHorizontalDivider.SetMiddle
NewerClient.png DHorizontalDivider.SetRight
NewerClient.png DHorizontalDivider.SetRightMin
NewerClient.png DHorizontalDivider.SetRigth
NewerClient.png DHorizontalDivider.StartGrab

Inherited from DPanel

NewerClient.png DPanel.Paint
NewerClient.png DPanel.SetDisabled
NewerClient.png DPanel.GetPaintBackground
NewerClient.png DPanel.GetDisabled
NewerClient.png DPanel.SetPaintBackground
NewerClient.png DPanel.ApplySchemeSettings

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox