Search Results for

Show / Hide Table of Contents

# Class TreeNode

Simple class for representing nodes, use with regular (non generic) TreeView.

##### Inheritance

System.Object
TreeNode

##### Implements

ITreeNode

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public class TreeNode : 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 |

##### Overrides

System.Object.ToString()

### Implements

ITreeNode