SelectedTreeViewNode ( treeview )
Parameters
| treeview - tree view gadget |
Description
|
Returns the handle of the selected tree view node, or 0 if none is selected. Requires Extended language mode. The result is a normal node handle, ready for TreeViewNodeText, CountTreeViewNodes or FreeTreeViewNode. A freshly built tree has no selection, so always allow for 0: node=SelectedTreeViewNode(tree) If node Then SetStatusText window,"Selected: "+TreeViewNodeText(node) Call it when the tree posts a $401 gadget-action event - that fires whenever the selection changes, whether from a click, the keyboard, or SelectTreeViewNode. GUI handles are positive type-checked ids, so 0 is never a valid node. See it working in the tree and text area sample. See also: SelectTreeViewNode, TreeViewNodeText, TreeViewRoot, CountTreeViewNodes. |
Index