DTree

From GMod Wiki

Revision as of 16:55, 26 April 2011 by Vigilante (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Derma Control: DTree
Parent Class:DPanelList
Subclasses:
Description:
Tree View

Examples

DescriptionCreates a DTree.
Used onNewerClient.png
Code
 
 
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50, 50 )
DermaPanel:SetSize( 310, 340 )
DermaPanel:SetTitle( "Testing Derma" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( false )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
 
local ctrl = vgui.Create( "DTree", DermaPanel )
 
ctrl:SetPos( 5, 30 )
ctrl:SetPadding( 5 )
ctrl:SetSize( 300, 300 )
 
local node = ctrl:AddNode( "Node One" )
local node = ctrl:AddNode( "Node Two" )
local cnode = node:AddNode( "Node 2.1" )
local cnode = node:AddNode( "Node 2.2" )
local cnode = node:AddNode( "Node 2.3" )
local cnode = node:AddNode( "Node 2.4" )
local cnode = node:AddNode( "Node 2.5" )
local gcnode = cnode:AddNode( "Node 2.5" )
local cnode = node:AddNode( "Node 2.6" )
local node = ctrl:AddNode( "Node Three ( Maps Folder )" )
node:MakeFolder( "maps", true )
local node = ctrl:AddNode( "Node Four" )
 
 
OutputDTree.PNG


Methods

NewerClient.png DTree.AddNode
NewerClient.png DTree.ChildExpanded
NewerClient.png DTree.Clear
NewerClient.png DTree.DoClick
NewerClient.png DTree.DoRightClick
NewerClient.png DTree.ExpandTo
NewerClient.png DTree.GenerateExample
NewerClient.png DTree.GetIndentSize
NewerClient.png DTree.GetLineHeight
NewerClient.png DTree.GetSelectedItem
NewerClient.png DTree.GetShowIcons
NewerClient.png DTree.GetTopNode
NewerClient.png DTree.Init
NewerClient.png DTree.Paint
NewerClient.png DTree.SetExpanded
NewerClient.png DTree.SetIndentSize
NewerClient.png DTree.SetLineHeight
NewerClient.png DTree.SetSelectedItem
NewerClient.png DTree.SetShowIcons
NewerClient.png DTree.ShowIcons

Inherited from DPanelList

NewerClient.png DPanelList.SizeToContents
NewerClient.png DPanelList.SetDrawBackground
NewerClient.png DPanelList.EnableHorizontal
NewerClient.png DPanelList.OnMouseWheeled
NewerClient.png DPanelList.GetItems
NewerClient.png DPanelList.Rebuild
NewerClient.png DPanelList.GetAutoSize
NewerClient.png DPanelList.SetPadding
NewerClient.png DPanelList.OnVScroll
NewerClient.png DPanelList.SortByMember
NewerClient.png DPanelList.GetSpacing
NewerClient.png DPanelList.GetDrawBackground
NewerClient.png DPanelList.PerformLayout
NewerClient.png DPanelList.GetCanvas
NewerClient.png DPanelList.SetSpacing
NewerClient.png DPanelList.AddItem
NewerClient.png DPanelList.EnableVerticalScrollbar
NewerClient.png DPanelList.GetPadding
NewerClient.png DPanelList.RemoveItem
NewerClient.png DPanelList.OnMousePressed
NewerClient.png DPanelList.SetAutoSize

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox