Click here to Skip to main content
15,880,796 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear all

i am new program to C#, When i type letters in the textbox the letters not goto outof textbox bounds and the letters height not redused, but the letters are shrink with in the textbox.

please help me, thanks
Posted
Comments
Sergey Alexandrovich Kryukov 21-Aug-11 21:58pm    
Tag it! WPF, Forms, ASP.NET, what?! What do you expect from the text box behavior and why? Is what you describe is what you expect?
--SA
Sergey Alexandrovich Kryukov 21-Aug-11 22:00pm    
What does it mean: not reduced by shrink?
--SA
gpasupathi 21-Aug-11 22:26pm    
Dear sir,
thanks
There is any posible use third party application use in c#
Dr.Walt Fair, PE 21-Aug-11 23:35pm    
As mentioned, please clarify what it is you are trying to do and what you have help with. Letters not extending past the textbox and not being shrunk is normal behavior.

I assume what you describe is what you expect. This is not how TextBox works. There is not a simple way to achieve this behavior. Manipulation of the font as contents of the TextBox is quite possible, but it's nearly impossible to adjust required font size, as exact string size measure is pretty inaccurate, due to the complex nature of text rendering.

More importantly, such behavior would make application nearly unusable. Letters should not shrink; it would make them nearly invisible. The font should change only by explicit command from the user. For a good example, look how modern versions of major Web browser handle this.

—SA
 
Share this answer
 
Comments
Simon Bang Terkildsen 21-Aug-11 22:12pm    
+5
Sergey Alexandrovich Kryukov 21-Aug-11 22:15pm    
Thank you, Simon.
--SA
If you want the TextBox to expand as needed or change the font size while typing, you will have to do that programatically.
 
Share this answer
 
Comments
gpasupathi 21-Aug-11 23:57pm    
Dear sir
There is any posible use third party application use in c#
thanks

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