System.Windows.Forms.ToolStripDropDownMenu.CreateDefaultItem Method

Creates a default System.Windows.Forms.ToolStripMenuItem with the specified text, image, and event handler on a new System.Windows.Forms.ToolStripDropDownMenu.

Syntax

protected override ToolStripItem CreateDefaultItem (string text, System.Drawing.Image image, EventHandler onClick)

Parameters

text
The text to use for the System.Windows.Forms.ToolStripMenuItem. If the text parameter is a hyphen (-), this method creates a System.Windows.Forms.ToolStripSeparator.
image
The System.Drawing.Image to display on the System.Windows.Forms.ToolStripMenuItem.
onClick
An event handler that raises the ToolStripItem.Click event when the System.Windows.Forms.ToolStripMenuItem is clicked.

Returns

A System.Windows.Forms.ToolStripMenuItem, or a System.Windows.Forms.ToolStripSeparator if the text parameter is a hyphen (-).

Remarks

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0