ColumnHeader.ImageIndex Property

Definition

Gets or sets the index of the image displayed in the ColumnHeader.

public:
 property int ImageIndex { int get(); void set(int value); };
[System.ComponentModel.TypeConverter(typeof(System.Windows.Forms.ImageIndexConverter))]
public int ImageIndex { get; set; }
member this.ImageIndex : int with get, set
Public Property ImageIndex As Integer

Property Value

The index of the image displayed in the ColumnHeader.

Attributes

Exceptions

Remarks

The ImageIndex property refers to the index of an image specified by the SmallImageList property of the ListView that contains the ColumnHeader. The ImageIndex property returns -1 if there is no SmallImageList set on the containing ListView. The image displayed in a column is typically used to indicate the state of items in the column.

ImageKey and ImageIndex are mutually exclusive, meaning if one is set, the other is set to an invalid value and ignored.

The image associated with a ColumnHeader is typically used to indicate the state information. If you set the ImageIndex to a value greater than the index of the last item in the associated image list, ImageIndex will be set to the index of the last item in the image list.

Applies to