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.
No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: