Skip to main content

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.

class TreeView(Widget): ...

Constructors​

TreeView(Widget parent)​

def __init__(self, parent: Widget):

Create a tree view inside parent.

ParameterTypeDescription
parentWidgetContaining widget.

Methods​

AddNode(int depth, bool isExpanded, bool hasChildren, string header)​

def AddNode(self, depth: int, isExpanded: bool, hasChildren: bool, header: str) -> None:

Append a visible node at the given indent level.

ParameterTypeDescription
depthintIndent depth, 0-based (0 = root level).
isExpandedboolWhether this node currently shows its children (visual only; the caller feeds the children themselves).
hasChildrenboolWhether to draw an expand/collapse chevron.
headerstringRow text; null is treated as empty.

Clear()​

def Clear(self) -> None:

Remove every node.