ItemCheckEventArgs Class


Provides data for the ItemCheck event of the CheckedListBox and ListView controls.

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


type ItemCheckEventArgs = 
        inherit EventArgs

System_CAPS_pubmethodItemCheckEventArgs(Int32, CheckState, CheckState)

Initializes a new instance of the ItemCheckEventArgs class.


Gets a value indicating the current state of the item's check box.


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


Gets or sets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

The ItemCheck event occurs when the checked state of an item in a checked list box changes. The ItemCheckEventArgs class specifies the index of the item to change, the current value of the check box for the item, and the new value to set for the check box.

For more information about handling events, see Handling and Raising Events.

The following code example demonstrates a checked ListView control that handles the ListView.ItemCheck 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

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top