ToolStrip.CreateDefaultItem(String, Image, EventHandler) ToolStrip.CreateDefaultItem(String, Image, EventHandler) ToolStrip.CreateDefaultItem(String, Image, EventHandler) Method

Definition

Creates a default ToolStripItem with the specified text, image, and event handler on a new ToolStrip instance.

protected public:
 virtual System::Windows::Forms::ToolStripItem ^ CreateDefaultItem(System::String ^ text, System::Drawing::Image ^ image, EventHandler ^ onClick);
protected internal virtual System.Windows.Forms.ToolStripItem CreateDefaultItem (string text, System.Drawing.Image image, EventHandler onClick);
abstract member CreateDefaultItem : string * System.Drawing.Image * EventHandler -> System.Windows.Forms.ToolStripItem
override this.CreateDefaultItem : string * System.Drawing.Image * EventHandler -> System.Windows.Forms.ToolStripItem

Parameters

text
String String String

The text to use for the ToolStripItem. If the text parameter is a hyphen (-), this method creates a ToolStripSeparator.

image
Image Image Image

The Image to display on the ToolStripItem.

onClick
EventHandler EventHandler EventHandler

An event handler that raises the Click event when the ToolStripItem is clicked.

Returns

Applies to