ערוך

שתף באמצעות


ToolStripButton Constructors

Definition

Initializes a new instance of the ToolStripButton class.

Overloads

ToolStripButton()

Initializes a new instance of the ToolStripButton class.

ToolStripButton(Image)

Initializes a new instance of the ToolStripButton class that displays the specified image.

ToolStripButton(String)

Initializes a new instance of the ToolStripButton class that displays the specified text.

ToolStripButton(String, Image)

Initializes a new instance of the ToolStripButton class that displays the specified text and image.

ToolStripButton(String, Image, EventHandler)

Initializes a new instance of the ToolStripButton class that displays the specified text and image and that raises the Click event.

ToolStripButton(String, Image, EventHandler, String)

Initializes a new instance of the ToolStripButton class with the specified name that displays the specified text and image and that raises the Click event.

ToolStripButton()

Initializes a new instance of the ToolStripButton class.

public:
 ToolStripButton();
public ToolStripButton ();
Public Sub New ()

Applies to

ToolStripButton(Image)

Initializes a new instance of the ToolStripButton class that displays the specified image.

public:
 ToolStripButton(System::Drawing::Image ^ image);
public ToolStripButton (System.Drawing.Image image);
public ToolStripButton (System.Drawing.Image? image);
new System.Windows.Forms.ToolStripButton : System.Drawing.Image -> System.Windows.Forms.ToolStripButton
Public Sub New (image As Image)

Parameters

image
Image

The image to display on the ToolStripButton.

Remarks

Use this constructor to create a ToolStripButton that displays only an image on the ToolStripButton.

Applies to

ToolStripButton(String)

Initializes a new instance of the ToolStripButton class that displays the specified text.

public:
 ToolStripButton(System::String ^ text);
public ToolStripButton (string text);
public ToolStripButton (string? text);
new System.Windows.Forms.ToolStripButton : string -> System.Windows.Forms.ToolStripButton
Public Sub New (text As String)

Parameters

text
String

The text to display on the ToolStripButton.

Remarks

Use this constructor to create a ToolStripButton that displays only text on the ToolStripButton.

Applies to

ToolStripButton(String, Image)

Initializes a new instance of the ToolStripButton class that displays the specified text and image.

public:
 ToolStripButton(System::String ^ text, System::Drawing::Image ^ image);
public ToolStripButton (string text, System.Drawing.Image image);
public ToolStripButton (string? text, System.Drawing.Image? image);
new System.Windows.Forms.ToolStripButton : string * System.Drawing.Image -> System.Windows.Forms.ToolStripButton
Public Sub New (text As String, image As Image)

Parameters

text
String

The text to display on the ToolStripButton.

image
Image

The image to display on the ToolStripButton.

Remarks

Use this constructor to create a ToolStripButton that displays both an image and text.

Applies to

ToolStripButton(String, Image, EventHandler)

Initializes a new instance of the ToolStripButton class that displays the specified text and image and that raises the Click event.

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

Parameters

text
String

The text to display on the ToolStripButton.

image
Image

The image to display on the ToolStripButton.

onClick
EventHandler

An event handler that raises the Click event.

Remarks

Use this constructor to create a ToolStripButton that displays both an image and text and raises the Click event when clicked.

Applies to

ToolStripButton(String, Image, EventHandler, String)

Initializes a new instance of the ToolStripButton class with the specified name that displays the specified text and image and that raises the Click event.

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

Parameters

text
String

The text to display on the ToolStripButton.

image
Image

The image to display on the ToolStripButton.

onClick
EventHandler

An event handler that raises the Click event.

name
String

The name of the ToolStripButton.

Remarks

Use this constructor to create a ToolStripButton with the specified name that displays both an image and text and raises the Click event when clicked.

Applies to