A TreeView control displays items in a hierarchical display. Each item, called a node, may contain parent or child items, and may be expanded or collapsed via a mouse click.
Newlook Smartclient only.
This control is useful for displaying data which is hierarchical in nature. It allows users to expand only the information that they need to see. Tree view nodes can also be displayed with check boxes which makes it possible to programmatically select or clear nodes by setting the Node's Checked property to true or false.
After inserting a tree view control in Designer, you can add, remove or reorganize Node objects by setting the relevant properties in Designer or invoking the relevant methods via a script.
The key property of the TreeView control is the Nodes property. It contains an array of nodes for the control. Icons can be displayed next to nodes by associating an image list control with the tree view's Icons property. Specific icons can then be assigned to individual nodes via the Icon and SelectedIcon property.
At runtime it is possible to return the node that the user has clicked via the LastClickedNode property.
When the material skin is enabled in your solution, tree view controls will be rendered with material styling. The most noticeable difference is a cleaner appearance, no borders and more spacing within the tree. If you have checkboxes enabled, then they will be rendered with the material primary color in the selected state.
Material skin |
Classic skin |
|
|
Nodes can be added to a tree view control's Nodes collection via the Add method. To remove all nodes from a TreeView use the Clear method, to remove individual nodes use the Remove method.
The LastClickedNode property can be used within a script or macro to return the node that was last clicked, or any property of that node. ()
Newlook Smartclient |
Newlook Server |
Deprecated
|
Obsolete
Newlook Smartclient |
Newlook Server |
Deprecated
|
Obsolete
Property |
Client |
Description |
|
Ensures that the specified node is visible within the control, scrolling the tree view control if necessary. |
|
|
Returns the first visible item in the control. |
Node object | Nodes collection | ListView control
© 2004-2021 looksoftware. All rights reserved.