Rediger

Del via


ToolBar.OnButtonClick(ToolBarButtonClickEventArgs) Method

Definition

Raises the ButtonClick event.

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

Parameters

e
ToolBarButtonClickEventArgs

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

Applies to

See also