Bagikan melalui


ListView.CheckedIndices Properti

Definisi

Mendapatkan indeks item yang saat ini dicentang dalam kontrol.

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

Nilai Properti

ListView.CheckedIndexCollection Yang berisi indeks item yang saat ini dicentang. Jika saat ini tidak ada item yang dicentang, kosong ListView.CheckedIndexCollection akan dikembalikan.

Atribut

Keterangan

Properti ini hanya berguna ketika CheckBoxes properti ListView kontrol diatur ke true. Properti CheckedIndices mengembalikan koleksi yang berisi posisi indeks di ListView.ListViewItemCollection semua item yang dicentang dalam kontrol. Untuk informasi selengkapnya tentang cara memanipulasi item dalam koleksi, lihat ListView.CheckedIndexCollection.

Jika Anda ingin mendapatkan kumpulan item yang dicentang dalam ListView kontrol, alih-alih posisi indeks item yang dicentang, gunakan CheckedItems properti .

Berlaku untuk

Lihat juga