TreeView Class
Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI
Hierarchical list. Nodes are added imperatively via TreeView.AddNode with a depth value: codegen walks the tree and emits one AddNode call per visible node.
public class TreeView : Widget
Constructors
TreeView(Widget parent)
public TreeView(Widget parent)
Create a tree view inside parent.
| Parameter | Type | Description |
|---|---|---|
parent | Widget | Containing widget. |
Methods
AddNode(int depth, bool isExpanded, bool hasChildren, string header)
public void AddNode(int depth, bool isExpanded, bool hasChildren, string header)
Append a visible node at the given indent level.
| Parameter | Type | Description |
|---|---|---|
depth | int | Indent depth, 0-based (0 = root level). |
isExpanded | bool | Whether this node currently shows its children (visual only; the caller feeds the children themselves). |
hasChildren | bool | Whether to draw an expand/collapse chevron. |
header | string | Row text; null is treated as empty. |
Clear()
public void Clear()
Remove every node.