Bewerken

Share via


ToolStripItem Constructors

Definition

Initializes a new instance of the ToolStripItem class.

Overloads

ToolStripItem()

Initializes a new instance of the ToolStripItem class.

ToolStripItem(String, Image, EventHandler)

Initializes a new instance of the ToolStripItem class with the specified name, image, and event handler.

ToolStripItem(String, Image, EventHandler, String)

Initializes a new instance of the ToolStripItem class with the specified display text, image, event handler, and name.

ToolStripItem()

Initializes a new instance of the ToolStripItem class.

protected:
 ToolStripItem();
protected ToolStripItem ();
Protected Sub New ()

Applies to

ToolStripItem(String, Image, EventHandler)

Initializes a new instance of the ToolStripItem class with the specified name, image, and event handler.

protected:
 ToolStripItem(System::String ^ text, System::Drawing::Image ^ image, EventHandler ^ onClick);
protected ToolStripItem (string text, System.Drawing.Image image, EventHandler onClick);
protected ToolStripItem (string? text, System.Drawing.Image? image, EventHandler? onClick);
new System.Windows.Forms.ToolStripItem : string * System.Drawing.Image * EventHandler -> System.Windows.Forms.ToolStripItem
Protected Sub New (text As String, image As Image, onClick As EventHandler)

Parameters

text
String

A String representing the name of the ToolStripItem.

image
Image

The Image to display on the ToolStripItem.

onClick
EventHandler

Raises the Click event when the user clicks the ToolStripItem.

Applies to

ToolStripItem(String, Image, EventHandler, String)

Initializes a new instance of the ToolStripItem class with the specified display text, image, event handler, and name.

protected:
 ToolStripItem(System::String ^ text, System::Drawing::Image ^ image, EventHandler ^ onClick, System::String ^ name);
protected ToolStripItem (string text, System.Drawing.Image image, EventHandler onClick, string name);
protected ToolStripItem (string? text, System.Drawing.Image? image, EventHandler? onClick, string? name);
new System.Windows.Forms.ToolStripItem : string * System.Drawing.Image * EventHandler * string -> System.Windows.Forms.ToolStripItem
Protected Sub New (text As String, image As Image, onClick As EventHandler, name As String)

Parameters

text
String

The text to display on the ToolStripItem.

image
Image

The Image to display on the ToolStripItem.

onClick
EventHandler

The event handler for the Click event.

name
String

The name of the ToolStripItem.

Applies to