Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ItemCheckEventArgs Class

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

System.Object
  System.EventArgs
    System.Windows.Forms.ItemCheckEventArgs

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

[<ComVisibleAttribute(true)>]
type ItemCheckEventArgs =  
    class 
        inherit EventArgs 
    end

The ItemCheckEventArgs type exposes the following members.

  NameDescription
Public methodItemCheckEventArgsInitializes a new instance of the ItemCheckEventArgs class.
Top

  NameDescription
Public propertyCurrentValueGets a value indicating the current state of the item's check box.
Public propertyIndexGets the zero-based index of the item to change.
Public propertyNewValueGets or sets a value indicating whether to set the check box for the item to be checked, unchecked, or indeterminate.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

.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

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