แก้ไข

แชร์ผ่าน


TreeView.OnBeforeCheck(TreeViewCancelEventArgs) Method

Definition

Raises the BeforeCheck event.

protected:
 virtual void OnBeforeCheck(System::Windows::Forms::TreeViewCancelEventArgs ^ e);
protected virtual void OnBeforeCheck (System.Windows.Forms.TreeViewCancelEventArgs e);
abstract member OnBeforeCheck : System.Windows.Forms.TreeViewCancelEventArgs -> unit
override this.OnBeforeCheck : System.Windows.Forms.TreeViewCancelEventArgs -> unit
Protected Overridable Sub OnBeforeCheck (e As TreeViewCancelEventArgs)

Parameters

e
TreeViewCancelEventArgs

A TreeViewCancelEventArgs 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 OnBeforeCheck 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 OnBeforeCheck(TreeViewCancelEventArgs) in a derived class, be sure to call the base class's OnBeforeCheck(TreeViewCancelEventArgs) method so that registered delegates receive the event.

Applies to

See also