ListView.StateImageList 屬性

定義

取得或設定與控制項中應用程式定義狀態相關的 ImageListGets or sets the ImageList associated with application-defined states in the control.

public:
 property System::Windows::Forms::ImageList ^ StateImageList { System::Windows::Forms::ImageList ^ get(); void set(System::Windows::Forms::ImageList ^ value); };
public System.Windows.Forms.ImageList StateImageList { get; set; }
member this.StateImageList : System.Windows.Forms.ImageList with get, set
Public Property StateImageList As ImageList

屬性值

ImageList

ImageList,其中包含一組狀態影像,可用來指示項目的應用程式定義的狀態。An ImageList that contains a set of state images that can be used to indicate an application-defined state of an item. 預設為 nullThe default is null.

備註

StateImageList屬性可讓您指定 ImageList ,其中包含用來代表控制項中專案之應用程式特定狀態的影像 ListViewThe 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. 您可以使用狀態影像(例如 checked 和 unchecked 核取方塊)來表示應用程式定義的專案狀態。You can use state images, such as checked and unchecked check boxes, to indicate application-defined item states. 狀態影像會顯示在控制項的所有視圖中 ListViewState images are visible in all views of the ListView control.

如果 ImageList 在屬性中指定, StateImageList 而且 CheckBoxes 屬性設定為 true ,則會顯示位於索引位置0和1的影像, ImageList 而不會顯示覆選框。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. 會顯示位於索引位置0的影像,而不是未核取的核取方塊,而是顯示位於索引位置1的影像,而不是核取的核取方塊。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.

適用於

另請參閱