Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to add TextBox control into toolstrip control,
I means add TextBox control not ToolStripTextBox control.

how to solve this question?
thanks for answer.
Posted
Updated 1-Feb-15 21:28pm
v2
Comments
[no name] 2-Feb-15 3:32am    
You can add the textbox control and make it work like toolStrip using some design properties.
CHill60 2-Feb-15 3:34am    
Are you specifically trying to get a multi-line textbox on to the toolStrip? Otherwise you should use ToolStripTextBox control - it's what it was designed for.
xuyunhai 2-Feb-15 3:42am    
I designed TextBox by myself,contains many functions,so i want to add textbox control into toolstrip.
CHill60 2-Feb-15 3:50am    
So you actually want to know how to add a custom control to a toolstrip?
Thanks7872 2-Feb-15 3:41am    
For that, you have to design popup which will be displayed on hover of the element.

Here is a solution for the question:
C#
TextBox txt1 = new TextBox();
ToolStripControlHost host1 = new ToolStripControlHost(txt1);
toolStrip1.Items.Insert(n, host1);  //n means the position of toolstrip item


Thanks
 
Share this answer
 
v3
hi xuyunhai
as You post if you want to show customize content in your tool tip for that you can use Jquery API for it and using ajax logic you can also load data dynamically using ajax request
for furter reference check the link below.

http://qtip1.com/demos/[^]

http://jqueryui.com/tooltip/[^]

I hope this will help you out
 
Share this answer
 
Comments
CHill60 2-Feb-15 7:34am    
Using jquery in winforms is a PITA - why would you do it this way when WinForms offers much more straightforward solutions (Note the question was tagged WinForm)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900