GUITreeNode
From Virtual World Web Wiki
Component representing a node in a GUITree
- Inherits class: GUIPanel
- This is a JavaScript visible object
Remarks [edit]
Properties
- int ChildCount {get;}
- Number of tree nodes under this node.
- GUIPanel ChildrenContainer {get;}
- Reference to the container that holds this node's child nodes
- GUIPanel ContentContainer {get;}
- Reference to the container that holds this node's content (label, etc)
- bool Enabled {get; set;}
- GUIToggle ExpandIcon {get;}
- Reference to this node's toggle for expanding
- GUIPanel ExpandIconPanel {get;}
- Reference to the panel containing this node's toggle for expanding
- bool Expanded {get; set;}
- Sets/gets the expanded state which determines if the children of the node are visible
- string ExtendedData {get; set;}
- Tag info that is initially populated if you use CreateFromJSON
- GUITreeNode ParentNode {get; set;}
- Reference to the immediate parent of this node
- bool Selected {get; set;}
- Gets the current selected state of the node
- GUIImageBox SelectedBackground {get;}
- Reference to this node's background (visible when the node is selected)
- GUIImageBox StateIcon {get;}
- Reference to this node's icon
- GUILabel Text {get;}
- Reference to this node's label
- GUIToggle Toggle {get;}
- GUITree Tree {get; set;}
- Reference to the tree this node is a part of
- int TreeNodeID {get; set;}
- This node's ID within its parent tree
Events
- OnClick()
- Event fired when this tree node is clicked
- OnDeselect()
- Event fired when this tree node becomes no longer selected
- OnDoubleClick()
- Event fired when this tree node is double-clicked
- OnSelect()
- Event fired when this tree node becomes selected
Methods
- GUITreeNode AddNode(string label, string template = NULL)
- void Collapse()
- Closes this node and stops showing its children - equivalent to Expand(false)
- void Deselect()
- Deselects this node in the tree
- void Expand(bool expanded = true)
- Opens or closes this node to show/hide children
- GUITreeNode FirstChild()
- Returns the first child node of this tree node
- GUITreeNode GetChild(int index)
- Returns the child node with the given index (or null if out of range)
- GUITreeNode[] GetChildNodes()
- Returns an array of all the child nodes in sibling-index order
- IEnumerable<GUITreeNode> GetSubNodes(bool visibleOnly = false)
- Traverses the tree and gets all descendents of this tree node
- void Invalidate()
- Triggers the invalidate event for this node
- GUITreeNode LastChild()
- Returns the final child node of this tree node
- GUITreeNode NextNode()
- Returns this node's next sibling (or null if its parent has no more children)
- GUITreeNode PrevNode()
- Returns this node's previous sibling (or null if this is its parents first child)
- void Select(bool additive = true)
- Selects this node in the tree