Normally, I use callLater then set the component's height to its
measuredHeight.  CallLater is required because the player doesn't always
know the text dimension in the same frame you set the text in.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of flexawesome
Sent: Thursday, July 31, 2008 7:27 PM
To: [email protected]
Subject: [flexcoders] Re: A simple component in AS - Setting height
Issues

 

Thanks for your replay...that could be make the component more big 
and slow?

I'd love to see how to set the textArea height dynamically after 
setting the text.

Thanks

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> If you set width only on your Text, and put it in a Canvas with no 
height
> set, it should grow as the Text component grows.
> 
> On Fri, Aug 1, 2008 at 11:57 AM, flexawesome <[EMAIL PROTECTED]> 
wrote:
> 
> > Hey I was trying to figure out how to dynamically make the grow in
> > height with the textArea in my component.
> >
> > by checking the docs here
> > 
http://livedocs.adobe.com/flex/3/langref/mx/controls/TextArea.html#tex
<http://livedocs.adobe.com/flex/3/langref/mx/controls/TextArea.html#tex>

tH
> > eight
> >
> > I was called the validateNow() method on the line 76, I was tried 
both
> > height & textHeight. However, it didn't work correctly.
> >
> > _txtHolder.setActualSize( unscaledWidth, _txtHolder.height );
> > _txtHolder.setActualSize( unscaledWidth, _txtHolder.textHeight );
> >
> >
> > code is here:
> >
> > http://www.privatepaste.com/c1QXxA5NBO
<http://www.privatepaste.com/c1QXxA5NBO> 
> >
> > Any suggestion
> >
> >
> > ------------------------------------
> >
> > --
> > Flexcoders Mailing List
> > FAQ: 
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
<http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt> 
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo
<http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo> ! 
Groups
> > Links
> >
> >
> >
> >
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for 
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>

 

Reply via email to