Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want a re sizable text box in windows application. If text more then text box area then user can increase the width of textbox using mouse. 
Text box width only changeable from right side of the text box
Posted

You have to handle mousedown, mousedrag and mouseup events, to trace mouse movements and then dispatch re-size calls to UI to set textbox width accordingly.
 
Share this answer
 
Comments
CHill60 30-Jul-15 6:34am    
Sample code would be nice
In exactly the same way as you were advised in Solution 3 to your earlier question How we move a label in windows forms when mouse click on it and when mouse key up then stop moving inside a group box[^]

Just inherit from TextBox instead of Label.
 
Share this answer
 

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