Share via


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

ListView.CheckedIndexCollection,包含目前所選取項目的索引。 如果目前並未選取項目,則傳回空白的 ListView.CheckedIndexCollection

屬性

備註

只有當 控制項的 ListView 屬性設定為 trueCheckBoxes ,這個屬性才有用。 屬性 CheckedIndices 會傳回集合,其中包含控制項中所有已核取之專案的索引位置 ListView.ListViewItemCollection 。 如需有關如何操作集合中專案的詳細資訊,請參閱 ListView.CheckedIndexCollection

如果您想要取得在 控制項中 ListView 核取的專案集合,而不是已核取之專案的索引位置,請使用 CheckedItems 屬性。

適用於

另請參閱