Node style
Flexible TreeView allows you a great deal of flexibility when customizing node appearance in any state. You can change anything from the color to the image and edit control.
In Flexible TreeView, the visual appearance has many levels of inheritance. The very first level is the current theme manager's settings, then it's the treeview's settings, then the node's settings, and then the node control's settings. Each level may be partially or fully overridden as described below.
Node style#
The Style node property contains the node style that, if defined, overrides all other shared styles.
You can easily combine the node style with the treeview style by using the Style.Weak node property. If it is enabled, the node style will be combined with the treeview style in a way that all node.Style properties that have default value will be retrieved from the treeview style.
If it is disabled, only the Style node property settings will be used as a node style.
The node style can be overridden per each node state.
Node state#
The node's state defines how the node appears and behaves in the treeview at the current time. As the end-user interacts with the treeview by moving the mouse cursor over the nodes, clicking them, etc., the treeview changes the state of the affected nodes accordingly.
A node can be in one of these states:
- Not selected - node isn't selected.
- Hot - node isn't selected, but it is under the mouse cursor.
- Soft selected - node isn't selected, but it is under the mouse cursor and soft selection mode is enabled. Node is displayed as selected and may change appearance.
- Selected - node is selected.
- Focused - node is selected and has input focus.
Note
Changes of the Images treeview collection affect all node states.
Not selected#
When a node is first added to the treeview, it is in general state, i.e., it isn't selected or focused. To control or override this state's style, use these properties:
- Colors.Text treeview property.
Hot#
When a node is under the mouse cursor, it is in Hot state. To control or override this state's style, use these properties:
- HotNodeStyle treeview property.
Soft selected#
When a node is under the mouse cursor and soft selection mode is enabled, it is in soft selected state. To control or override this state's style, use these properties:
- SoftSelectedNodeStyle treeview property.
Selected#
When a node is selected, it is in Selected state. To control or override this state's style, use these properties:
- SelectedNodeStyle treeview property.
Focused#
When a node is selected and has input focus, it is in Focused state. To control or override this state's style, use these properties:
- FocusedNodeStyle treeview property.