Category:DTree

From Garry's Mod
Jump to: navigation, search

Contents

DescriptionPanelPage

A tree view element for Derma.

See also DTree_Node.

Inherited Functions

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


Examples

Example

Example of using DTree

local frame = vgui.Create( "DFrame" )
frame:SetSize( 300, 500 )
frame:Center()
frame:MakePopup()

local dtree  = vgui.Create( "DTree", frame )
dtree:Dock( FILL )

local node = dtree:AddNode( "Node One" )
local node = dtree: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 = dtree:AddNode( "Node Three ( Maps Folder )" )
node:MakeFolder( "maps", "GAME", true )
local node = dtree:AddNode( "Node Four" )


Personal tools
Navigation