Редагувати

Поділитися через


CheckedListBox.OnItemCheck(ItemCheckEventArgs) Method

Definition

Raises the ItemCheck event.

protected:
 virtual void OnItemCheck(System::Windows::Forms::ItemCheckEventArgs ^ ice);
protected virtual void OnItemCheck (System.Windows.Forms.ItemCheckEventArgs ice);
abstract member OnItemCheck : System.Windows.Forms.ItemCheckEventArgs -> unit
override this.OnItemCheck : System.Windows.Forms.ItemCheckEventArgs -> unit
Protected Overridable Sub OnItemCheck (ice As ItemCheckEventArgs)

Parameters

ice
ItemCheckEventArgs

An ItemCheckEventArgs that contains the event data.

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnItemCheck method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnItemCheck(ItemCheckEventArgs) in a derived class, be sure to call the base class' OnItemCheck(ItemCheckEventArgs) method so that registered delegates receive the event.

Applies to