Skip to content

AddTreeViewNode

Claude edited this page Oct 26, 2026 · 5 revisions

AddTreeViewNode

Command Index · BlitzPlus · Tree Views

AddTreeViewNode text$, parent_node%, icon%=-1  ; returns Int

Works in: BlitzPlus

Adds a node at the end of the children of another node. To add one at the top level, give TreeViewRoot as the parent.

Graphics 320, 240, 32, 2
win  = CreateWindow("Files", 10, 10, 300, 200, Desktop(), 3)
tree = CreateTreeView(10, 10, 270, 140, win)
root = TreeViewRoot(tree)
docs = AddTreeViewNode("Documents", root)
AddTreeViewNode "Letter.txt", docs
AddTreeViewNode "Notes.txt", docs
AddTreeViewNode "Pictures", root
ExpandTreeViewNode docs
Repeat
Until WaitEvent() = $803

AddTreeViewNode

Parameter Type Default Description
text String required Text of the node.
parent_node Int required
icon Int -1 Number of an icon of the tree. Defaults to -1, which means none.

Returns: A handle for the new node.

Related commands

Command Index · BlitzPlus · Tree Views

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally