ItemCheckEventArgs.Index Property

Gets the zero-based index of the item to change.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

member Index : int with get

Property Value

Type: System.Int32
The zero-based index of the item to change.

You can use this property to determine which item's check box in the CheckedListBox is being changed.

The following code example demonstrates a checked ListView control that handles the ListView.ItemChecked event. The method uses the CurrentValue and Index properties of the ItemCheckEventArgs object to retrieve and tally the price of the menu items selected. To run this example paste the following code in a form containing a ListView named ListView1 and a TextBox named Textbox1. Call the InititalizeListView method from the form's constructor or Load method. Ensure all events are associated with their event-handling methods.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft