Blitz3D+ Command Reference

TreeViewNodeText$ ( node )

Parameters

node - tree view node

Description

Returns the text of a tree view node.

Requires Extended language mode.

Reads back the label a node was given by AddTreeViewNode, InsertTreeViewNode or ModifyTreeViewNode. The classic use is reacting to a selection: a $401 event arrives from the tree, SelectedTreeViewNode says which node, and TreeViewNodeText turns that into the name you look up in your own scene data - or print into a properties pane.

Text is UTF-8, like everywhere in the GUI. The invisible root from TreeViewRoot has no label and returns an empty string.

If the node's text is really a key into game data, consider storing the node handle in your own structures at creation time instead - handles are unique for the whole run, which survives two nodes sharing a name.

See it working in the tree and text area sample and the world editor shell sample.

See also: ModifyTreeViewNode, SelectedTreeViewNode, AddTreeViewNode, TreeViewRoot, GadgetItemText.

Index