F O R · R E A L L Y · T H I N · C L I E N T S
 Home  |  Overview  |  Widgets  |  Demo  |  License  |  History 

» Component
» Label
» Button
» CheckBox
» ComboBox
» TextField
» PasswordField
» TextArea
» TabbedPane
» Panel
» Desktop
» Dialog
» SpinBox
» ProgressBar
» Slider
» SplitPane
» List
» Table
» Tree
» Separator
» MenuBar

Tree
Tree displays a set of hierarchical data, contains nodes (not only one root node is allowed), and a node could have subnodes. It internally handles scrolling. The following example shows a tree with 2 root nodes ('Node A', and 'Node D'), the first has 2 subnodes (a selected 'Node B' and 'Node C'), the collapsed 'Node D' includes one node.
<tree selection="multiple">
  <node text="Node A" icon="image.gif">
    <node text="Node B" icon="image.gif" selected="true" />
    <node text="Node C" icon="image.gif" />
  </node>
  <node text="Node D" expanded="false">
    <node text="Node E" icon="image.gif" />
  </node>
</tree>

Parameters
NameTypeDefaultDescription
selectionchoicesingle Possible values are: single, interval, and multiple. For the default single value the selection can only contain one path at a time, for interval the selection can only be contiguous (of the currently visible nodes), and for the multiple value the selection can contain any number of nodes that are not necessarily contiguous.
actionmethodnull Calls the method whenever the selection changes.
expandmethodnull The listener that's notified when the tree expands a node.
collapsemethodnull Called whenever a node in the tree has been collapsed.
name, enabled, visible, tooltip, width, height, colspan, rowspan, weightx, weighty, halign, and valign parameters are similar to component


Node
Tree node is similar to list item, but maybe contains subnodes, and has collapse control.

Parameters
NameTypeDefaultDescription
selectedbooleanfalse True if currently selected.
expandedbooleantrue Ensures that the node is expanded if true, otherwise collapsed.
name, enabled, text, icon, and alignment parameters are similar to combobox choice

Keyboard-actions
OperationAction
Right arrowExpands current collapsed node, or selects its first subnode
Left arrowCollapses current expanded node, or selects its parent node
Up arrowSelects previous node
Down arrowSelects next node
HomeSelects first node
EndSelects last node
Page UpSelects node one view up
Page DownSelects node one view down
+ShiftExtends selection
+CtrlSet lead node
SpaceSelects lead node
Ctrl-A, Ctrl-SlashSelects all
Ctrl-BackslashDeselects all
Tab, Shift-TabNavigate forward, backward

Copyright © 2002 Robert Bajzat - info@thinlet.com - All rights reserved.