共用方式為


ListView.CheckedIndices 屬性

定義

取得目前已檢查項目的索引。

public:
 property System::Windows::Forms::ListView::CheckedIndexCollection ^ CheckedIndices { System::Windows::Forms::ListView::CheckedIndexCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.ListView.CheckedIndexCollection CheckedIndices { get; }
[<System.ComponentModel.Browsable(false)>]
member this.CheckedIndices : System.Windows.Forms.ListView.CheckedIndexCollection
Public ReadOnly Property CheckedIndices As ListView.CheckedIndexCollection

屬性值

ListView.CheckedIndexCollection A 包含目前已檢查項目的索引。 如果目前沒有檢查項目,則會返回空 ListView.CheckedIndexCollection 物。

屬性

備註

此性質僅在CheckBoxesListView控制項屬性設為 true時有用。 該 CheckedIndices 屬性回傳一個集合,包含所有在控制中檢查的項目中索引 ListView.ListViewItemCollection 位置。 關於如何操作收藏中的物品,請參見 ListView.CheckedIndexCollection

如果你想取得控制項中被檢查 ListView 項目的集合,而不是檢查項目的索引位置,請使用屬性 CheckedItems

適用於

另請參閱