Link to home
Start Free TrialLog in
Avatar of amotaz
amotaz

asked on

Dynamically setting the TextField size according to read Text

Hi all,

I am reading some text from a file. I load it into a textfield and that textfield is in a movieclip which in turn is in a scrollpane.

The problem is the text size varies. And I want to be able to view the whole text. How can I automatically set the size (or height) of the textfield to the size of what I read? (that might have little bits of HTML).

Thanks in advance
ASKER CERTIFIED SOLUTION
Avatar of negatyve
negatyve

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of amotaz
amotaz

ASKER

Thank YOU!!!

I do not know how I overlooked the autoSize property. Thanks again!

I give you a little bonus :)
Avatar of amotaz

ASKER

umm, I think there is something wrong here.

I tried to create some data file like this...


** any crap here **
and at the end

(a number of tabs, like 20-30) and then any text.

The text after the tab disappears.
sorry?
Avatar of amotaz

ASKER

What I am trying to say is that it works perfectly; however, it has some bug, I guess.

In the text file, put 20 or 30 (tabs). When I did that, the text following the tabs disappeared.

Hope that's clear.
I have tried with this text:

content=I am reading some text from a file. I load it into a textfield                                                                                                                                                                                                                                                       and that textfield is in a movieclip which in turn is in a scrollpane. The problem is the text size varies. And I want to be able to view the whole text. How can I automatically set the size (or height) of the textfield to the size of what I read? (that might have little bits of HTML). I am reading some text from a file. I load it into a textfield and that textfield is in a movieclip which in turn is in a scrollpane. The problem is the text size varies. And I want to be able to view the whole text. How can I automatically set the size (or height) of the textfield to the size of what I read? (that might have little bits of HTML).

[actually they are 40 tabs]

and still works...
Avatar of amotaz

ASKER

umm, weird...


anyway, thanks a lot :)