Treeview options
Flexible TreeView allows you to change the appearance and behavior of every part of the treeview. To control the treeview appearance and behavior use the Options treeview property.
Below is the description of those options that didn't appear in other articles.
Options.Appearance properties#
ShowHorzScroll, ShowVertScroll#
Treeview scroll bars are accessible in the HorzScrollBar and VertScrollBar properties. Scroll bars can be hidden by disabling the Options.Appearance.ShowHorzScroll and Options.Appearance.ShowVertScroll properties respectively.
Options.Behavior properties#
SmartVerticalScroll#
When a treeview contains long nodes, it may be hard to view all content of this treeview. Flexible TreeView allows you to greatly improve working with this kind of data by introducing a smart vertical scroll - when you scroll the treeview vertically, it tries to locate the best horizontal position to view currently visible nodes, and then scrolls to that position automatically. You can disable this behavior by disabling the Options.Behavior.SmartVerticalScroll property.
Options.Node properties#
AutoExpandMode, AutoCollapseMode#
The AutoExpandMode and AutoCollapseMode properties define the treeview nodes expansion and collapse behavior respectively.
The possible values are:
- Disabled - node won't be automatically expanded or collapsed.
- OnClick - node will be automatically expanded or collapsed when user click the node.
- OnDoubleClick - node will be automatically expanded or collapsed when user double click the node.
- OnMouseHover - node will be automatically expanded when user hover the mouse cursor over the node and collapsed when the mouse cursor goes out of the target node bounds.
The AutoExpandMode and AutoCollapseMode properties are working independently, i.e. the AutoExpandMode could be set to automatically expand a node while the AutoCollapseMode could be set to NodeExpansionMode.Disabled value what prevent the node from collapse.