I want to add a text button onto a WinForms toolbar (a standard button on a toolbar can contain an image only).
A textbox, a combobox can be easily added onto a toolbar but there is no option for a text button.
How can that be achieved?
UPD By 'text button' I mean the standard Windows button.
Set ToolStripItem.DisplayStyle to Text :
var toolStripButton = new ToolStripButton();
toolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Text;
You can use a ToolStripControlHost to embed any control in your toolstrip:
Button button = new Button();
button.Text = "Standard Windows Button";
yourToolStrip.Items.Add(new ToolStripControlHost(button));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With