ToolStrip.CreateDefaultItem(String, Image, EventHandler) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
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
Protected Friend Overridable Function CreateDefaultItem (text As String, image As Image, onClick As EventHandler) As ToolStripItem
Parameters
- text
- String
The text to use for the ToolStripItem. If the text
parameter is a hyphen (-), this method creates a ToolStripSeparator.
- image
- Image
The Image to display on the ToolStripItem.
- onClick
- EventHandler
An event handler that raises the Click event when the ToolStripItem is clicked.
Returns
A ToolStripButton(String, Image, EventHandler), or a ToolStripSeparator if the text
parameter is a hyphen (-).
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort: Gedurende 2024 worden GitHub Issues uitgefaseerd als het feedbackmechanisme voor inhoud. Dit wordt vervangen door een nieuw feedbacksysteem. Ga voor meer informatie naar:Feedback verzenden en bekijken voor