|
-
Nov 23rd, 2003, 09:58 PM
#1
Thread Starter
Hyperactive Member
Make a text box grow to accomodate input [Resolved]
Hi team
I want a text box to grow dynamically in height as the user enters text. I have this working by counting the number of characters and dividing this by the typical number of characters that fit onto a line. However, some characters take up less space that others. 50 "i"s will cause it to create an new line when it does not need one, but 50 "W"s does not create a new line when one is needed. I want the user to be able to continue typing and have the text box elegantly grow to accomodate all the entered text.
One idea is to intercept the events that tell a scroll bar (if one existed, I don't want one) how much text there is and how long the scroll bar needs to be. I could then use these values to set the height. Does anyone know how to do this?
Has anyone got any other ideas?
Thanks FW
Last edited by freewilly; Nov 24th, 2003 at 05:17 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|