ListView.StateImageList 屬性

定義

取得或設定與控制項中應用程式定義狀態相關的 ImageList

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; }
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,其中包含一組狀態影像,可用來指示項目的應用程式定義的狀態。 預設為 null

備註

屬性 StateImageList 可讓您指定要 ImageList 用來代表控制項中 ListView 專案應用程式特定狀態之影像的 。 狀態影像會顯示在專案的圖示左邊。 您可以使用狀態影像,例如已核取和未核取的核取方塊,來指出應用程式定義的專案狀態。 狀態影像會顯示在控制項的所有檢視 ListView 中。

如果在 屬性中 StateImageList 指定 , ImageListCheckBoxes 屬性設定 true 為 ,則會顯示 中索引位置為 0 和 1 的 ImageList 影像,而不是核取方塊。 索引位置 0 的影像會顯示,而不是未核取的核取方塊,而索引位置為 1 的影像則會顯示,而不是核取的核取方塊。

適用於

另請參閱