ToolStripItem ToolStripItem ToolStripItem ToolStripItem Constructors

定义

重载

ToolStripItem() ToolStripItem() ToolStripItem()

初始化 ToolStripItem 类的新实例。Initializes a new instance of the ToolStripItem class.

ToolStripItem(String, Image, EventHandler) ToolStripItem(String, Image, EventHandler) ToolStripItem(String, Image, EventHandler)

使用指定的名称、图像和事件处理程序初始化 ToolStripItem 类的一个新实例。Initializes a new instance of the ToolStripItem class with the specified name, image, and event handler.

ToolStripItem(String, Image, EventHandler, String) ToolStripItem(String, Image, EventHandler, String) ToolStripItem(String, Image, EventHandler, String)

初始化 ToolStripItem 类的一个新实例,使其具有指定的显示文本、图像、事件处理程序和名称。Initializes a new instance of the ToolStripItem class with the specified display text, image, event handler, and name.

ToolStripItem() ToolStripItem() ToolStripItem()

初始化 ToolStripItem 类的新实例。Initializes a new instance of the ToolStripItem class.

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

ToolStripItem(String, Image, EventHandler) ToolStripItem(String, Image, EventHandler) ToolStripItem(String, Image, EventHandler)

使用指定的名称、图像和事件处理程序初始化 ToolStripItem 类的一个新实例。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);
new System.Windows.Forms.ToolStripItem : string * System.Drawing.Image * EventHandler -> System.Windows.Forms.ToolStripItem

参数

text
String String String String

一个 String,表示 ToolStripItem 的名称。A String representing the name of the ToolStripItem.

image
Image Image Image Image

要在 ToolStripItem 上显示的 ImageThe Image to display on the ToolStripItem.

onClick
EventHandler EventHandler EventHandler EventHandler

当用户单击 Click 时将引发 ToolStripItem 事件。Raises the Click event when the user clicks the ToolStripItem.

ToolStripItem(String, Image, EventHandler, String) ToolStripItem(String, Image, EventHandler, String) ToolStripItem(String, Image, EventHandler, String)

初始化 ToolStripItem 类的一个新实例,使其具有指定的显示文本、图像、事件处理程序和名称。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);
new System.Windows.Forms.ToolStripItem : string * System.Drawing.Image * EventHandler * string -> System.Windows.Forms.ToolStripItem

参数

text
String String String String

要在 ToolStripItem 上显示的文本。The text to display on the ToolStripItem.

image
Image Image Image Image

要在 ToolStripItem 上显示的图像。The Image to display on the ToolStripItem.

onClick
EventHandler EventHandler EventHandler EventHandler

Click 事件的事件处理程序。The event handler for the Click event.

name
String String String String

ToolStripItem 的名称。The name of the ToolStripItem.

适用于