Skip to main content
A newer version of this page is available. .

TreeListNode.ImageIndex Property

Gets or sets the index of the node’s select image displayed when this node is not focused.

Namespace: DevExpress.XtraTreeList.Nodes

Assembly: DevExpress.XtraTreeList.v19.1.dll

Declaration

[DefaultValue(0)]
[DXCategory("Appearance")]
[ImageList("SelectImageList")]
public virtual int ImageIndex { get; set; }

Property Value

Type Default Description
Int32 0

An integer value representing the zero-based index of the select image displayed when this node is not focused.

Remarks

veNodeImage

The source of select images is specified by the TreeList.SelectImageList property. Certain select images are assigned to nodes by indexes (zero-based integer values referring to images in the SelectImageList).

The ImageIndex property identifies the index of a node’s select image displayed when this node is not focused. When the node is focused, this image is automatically replaced with the image specified by the TreeListNode.SelectImageIndex property.

The Tree List can automatically load select image indexes from a data source. To accomplish this, assign the field that stores select image indexes to the TreeList.ImageIndexFieldName property. When using the TreeList.ImageIndexFieldName, TreeListNode.ImageIndex and TreeListNode.SelectImageIndex simultaneously, the latter two properties are in effect if an image index retrieved from a data source is -1.

The image indexes provided by the ImageIndex and TreeListNode.SelectImageIndex properties can be overridden by handling the TreeList.GetSelectImage event.

If the image index is less than 0 or exceeds the last available index, no select image is painted for the node.

See TreeList.SelectImageList to learn more.

See Also