BBjTree::getRoot

Description

This method returns the ID of the root node in the BBjTree control.

Syntax

Return Value Method
int getRoot()

Parameters

None.

Return Value

Returns the ID of the root node. Reports an error if the root node has not been set.

Example

rem 'Get the root node of a tree control

sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(100,100,200,200,"BBjTree",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
tree! = window!.addTree(101,50,50,100,100)
root = 0
root$ = "Root Node"
tree!.setRoot(root,root$)
print "tree!.getRoot() =",tree!.getRoot()

process_events

eoj:
release

See Also

BBjTree::setRoot

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.