Hello, I have a dynamic textfield which receive the text the user input. And I want to make it like no matter how many words the user type, it always have the same area of the box,
say if the user type hello, the texfield box is
-
-
this large
and if the user type hello, the world, the textfield change to
-
the font seems smaller than the former one, but the total area remains the same. How should I make the coding so that it can have this kind of effect.
Thanks very much in advance!
So you want the textbox to size to what the user types? I don’t really understand… Do you want it to remain the same size whether or not the user type supercalafragilistaexpealidocious or Hello ? Can you post a sample fla?
thanks for your reply. But what I want to know is how to make the textbox has the same area no matter how many words the user type. Say at first time, he types “hello”, and at the second time, he types “Hello, the world”. Then “Hello” and “Hello, the world” has same area of the box but for “hello”, the font size is bigger than for “Hello the world”, because of the length is shorter.
Am I made myself clear this time? I don’t mean by autosize. Because that can only enlarge the length of the box if there are more input. But I want the same area with smaller font size if more input!
Thanks if you have any good suggestion!
Thanks again and wait for your reply!
In simple words: adjust the size of input text so as to keep it visible in a non-autosizing textbox no matter how long the input is…lol
That might be done by using different textFormat objects to the input, but will be quite cpu-intensive, coz you’d have to check at every letter if it still fits, or if you have to change format, recheck to see if it now fits, if not, change again…
I don’t see an easy way to do that, and I wonder why you’d want text in there way to small to read…what’s the use?