Редагувати

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


TreeView.OnBeforeSelect(TreeViewCancelEventArgs) Method

Definition

Raises the BeforeSelect event.

protected:
 virtual void OnBeforeSelect(System::Windows::Forms::TreeViewCancelEventArgs ^ e);
protected virtual void OnBeforeSelect (System.Windows.Forms.TreeViewCancelEventArgs e);
abstract member OnBeforeSelect : System.Windows.Forms.TreeViewCancelEventArgs -> unit
override this.OnBeforeSelect : System.Windows.Forms.TreeViewCancelEventArgs -> unit
Protected Overridable Sub OnBeforeSelect (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 OnBeforeSelect 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 OnBeforeSelect(TreeViewCancelEventArgs) in a derived class, be sure to call the base class's OnBeforeSelect(TreeViewCancelEventArgs) method so that registered delegates receive the event.

Applies to

See also