[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TTreeNode.StateIndex

Ordinal position for the image displayed to represent the state for the tree node.

## Declaration

Source position: comctrls.pp line 3173

`public property TTreeNode.StateIndex : Integer read FStateIndex write SetStateIndex default - 1;`

## Description

StateIndex refers to a position in StateImages for the associated TreeView control. It determines the image displayed to the left of the icon image specified in ImageIndex. The default value for the property is -1, and indicates that an image has not been assigned to represent the state for the tree node.

Changing the value for the property causes the tree node and the associated TreeView control to be redrawn. The Changed method is called to notify the TreeView control of the reason for the update.

StateIndex can be used (along with StateImages in TreeView) to approximate the check box available for tree nodes in Delphi VCL but not in LCL.

Use StateImages in TTreeView / TCustomTreeView to specify the available state images.

Use ImageIndex to specify the icon displayed for the tree node.

Use OverlayIndex to specify an overlay displayed on the icon for the tree node.

Use SelectedIndex to specify the icon displayed when the tree node is Selected.

## See also

TTreeNode.TreeView |  | The tree view control where the node is displayed.
TTreeNode.ImageIndex |  | Ordinal position for the image displayed for the node, or -1 when no image is assigned.
TTreeNode.OverlayIndex |  | Ordinal position for the overlay image used for the node.
TTreeNode.SelectedIndex |  | Ordinal position for the image displayed when the tree node is Selected.
TTreeNode.Update |  | Redraws the associated TreeView control if an update is not already in progress.
TTreeNode.Changed |  | Performs a change notification for the node with the specified reason.
TTreeView.StateImages |  | Image list with the bitmaps used to represent the state for nodes in the tree.
TTreeView.Images |  | Image list which holds icons for the tree nodes in Items.