DojoTreeNode

The DojoTreeNode record creates the elements that compose a tree.

Properties

children
Define the sub-elements of the node, enclose the sub-elements in brackets, and separate each DojoTreeNode record with a comma.
children = [ new DojoTreeNode { id = node_id, text = node_text },
             new DojoTreeNode { id = node_id, text = node_name }
           ]
id
The required identifier for this tree node
text
The name of the node

Example

The following example shows the code and output for a tree diagram that contains two nodes: North America and Europe. The nodes are defined by the TreeNode record, which is pointed to by the treeNodes property.


DojoTree { text="World",onClick ::= handleCity,children=[
						DojoTreeNode {id="NA",text="North America",children=[
								DojoTreeNode {id="CA",text="Canada"},
								DojoTreeNode {id="US",text="USA"}	]},
				
						DojoTreeNode {id="EU",text="Europe",children= [
		 						DojoTreeNode {id="GR",text="Greece"},
		 						DojoTreeNode {id="IT",text="Italy"}]}

Example of a tree diagram that contains two nodes: North America and Europe.

Feedback