This documentation is archived and is not being maintained.

ListView.StateImageList Property

Gets or sets the ImageList associated with application-defined states in the control.

[Visual Basic]
Public Property StateImageList As ImageList
public ImageList StateImageList {get; set;}
public: __property ImageList* get_StateImageList();
public: __property void set_StateImageList(ImageList*);
public function get StateImageList() : ImageList;
public function set StateImageList(ImageList);

Property Value

An ImageList that contains a set of state images that can be used to indicate an application-defined state of an item. The default is a null reference (Nothing in Visual Basic).


The StateImageList property allows you to specify an ImageList that contains images to use to represent an application-specific state of an item in a ListView control. State images are displayed to the left of an icon for the item. You can use state images, such as checked and unchecked check boxes, to indicate application-defined item states. State images are visible in all views of the ListView control.

If an ImageList is specified in the StateImageList property and the CheckBoxes property is set to true, the images at index positions 0 and 1 in the ImageList are displayed instead of the check box. The image at index position 0 is displayed instead of the unchecked check box, and the image at index position 1 is displayed instead of the checked check box.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ListView Class | ListView Members | System.Windows.Forms Namespace | ImageList | LargeImageList | SmallImageList | CheckBoxes