1

It seems like it's not possible for some reason but it worth a try: Is it possible to add inherited TextBox to a ToolStrip?

Thank you.

gavra
  • 93
  • 1
  • 2
  • 11

1 Answers1

1

If you want a custom textbox, you will need to have your textbox inherit from ToolStripTextBox instead of just TextBox. Then you can add it from code or the designer.

Custom Toolstrip textbox

John Koerner
  • 37,428
  • 8
  • 84
  • 134
  • Thank you for your answer. I did what you said manually meaning I created a class as follow: class IdTextBox : ToolStripTextBox, and also created a constructor that has no parameters, rebuild the solution, but I still don't have my idTextBox in the toolstrip tools list. By the way, I tried to add an inherited control (instead of a class) but in the inheritance picker I get the following warning: "No built assemblies contain components to inherit from. Build the current application, or click Browse and select a previously built assembly from another application". – gavra Apr 23 '12 at 05:18
  • Are they in the same project? Is the class public? – John Koerner Apr 23 '12 at 11:15