Export (0) Print
Expand All

ColumnHeader.ImageIndex Property

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

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

[TypeConverterAttribute(typeof(ImageIndexConverter))] 
public int ImageIndex { get; set; }
/** @property */
public int get_ImageIndex ()

/** @property */
public void set_ImageIndex (int value)

public function get ImageIndex () : int

public function set ImageIndex (value : int)

Not applicable.

Property Value

The index of the image displayed in the ColumnHeader.

Exception typeCondition

ArgumentOutOfRangeException

ImageIndex is less than -1.

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft