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)

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

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

NameDescription
System_CAPS_pubmethodItemCheckEventArgs(Int32, CheckState, CheckState)

Initializes a new instance of the ItemCheckEventArgs class.

NameDescription
System_CAPS_pubpropertyCurrentValue

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

System_CAPS_pubpropertyIndex

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

System_CAPS_pubpropertyNewValue

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

NameDescription
System_CAPS_pubmethodEquals(Object)

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

System_CAPS_protmethodFinalize()

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

System_CAPS_pubmethodGetHashCode()

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

System_CAPS_pubmethodGetType()

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

System_CAPS_protmethodMemberwiseClone()

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

System_CAPS_pubmethodToString()

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
Show: