Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,
I am developing user define control and i want to resize the control when i use in my project but i am not able to resize the textbox but i can resize the control
how to resize the textbox on design time.
Please repply.
Posted
Updated 1-Feb-12 1:09am
v2
Comments
Sanjay K. Gupta 1-Feb-12 7:12am    
First try it yourself. Learn more about it on the net. If you get any discrepancy, then post here.

Best of Luck!
satoshtiwari 1-Feb-12 7:14am    
Thanks for reply i tried my best but did not get any solutions
Thanks
Amir Mahfoozi 1-Feb-12 7:30am    
WPF ? ASP.NET ? or what ?

1 solution

Unless you are using WPF, textboxes don't resize well vertically - the font size is fixed, and does not vary automatically relative to the control height. If you want the text to change size (which is the only practical way to change the height of a single line text box) then you will need to handle the Controls SizeChanged event and alter the font size yourself.
Resizing it horizontally is just a case of setting the Anchor property correctly.
 
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