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

# TTreeNode.SelectedIndex

Ordinal position for the image displayed when the tree node is Selected.

## Declaration

Source position: comctrls.pp line 3172

`public property TTreeNode.SelectedIndex : Integer read FSelectedIndex write SetSelectedIndex default - 1;`

## Description

SelectedIndex is an Integer property with the ordinal position for the image displayed when the node is Selected. It refers to a bitmap in the Images property for the TreeView control, and allows an alternate image to be displayed for the node when it is selected. The default value is -1 and indicates that an image index has not been assigned.

Changing the value in the property causes the Update method to be called to redraw the associated TreeView control. The Changed method is called with the ncSelectedIndex node change reason.

Use ImageIndex to set the ordinal position for the image displayed when the tree node is not selected.

## See also

TTreeNode.ImageIndex |  | Ordinal position for the image displayed for the node, or -1 when no image is assigned.