Skip to content

AddTreeViewNode

Claude edited this page Oct 27, 2026 · 5 revisions

AddTreeViewNode

Command Index · BlitzPlus · Tree Views

Command Syntax

AddTreeViewNode:Int32 text:String, parent_node:Int32, icon:Int32=-1

Description

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.

Parameters

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

Returns: A handle for the new node.

Examples

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

Media

AddTreeViewNode

Related Commands

Command Index · BlitzPlus · Tree Views

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

Clone this wiki locally