Class TreeNode
Simple class for representing nodes, use with regular (non generic) TreeView.
Inheritance
System.Object
TreeNode
Implements
Namespace: Terminal.Gui.Trees
Assembly: Terminal.Gui.dll
Syntax
public class TreeNode : Object, ITreeNode
Constructors
TreeNode()
Initialises a new instance with no Text
Declaration
public TreeNode()
TreeNode(String)
Initialises a new instance and sets starting Text
Declaration
public TreeNode(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text |
Properties
Children
Children of the current node
Declaration
public virtual IList<ITreeNode> Children { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IList<ITreeNode> |
Tag
Optionally allows you to store some custom data/class here.
Declaration
public object Tag { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object |
Text
Text to display in tree node for current entry
Declaration
public virtual string Text { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
ToString()
returns Text
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |