Rather than do it on an interval, which is probably processing way too often,
why not fire it on an onChange? maybe use the callLater to wait till the frame
after the change so that the text is guaranteed to already be drawn. CallLater
works like this:
public function myFunct():void{
callLater(
function():void{
//stuff to do one frame later
}
)
}
It's a great tool
--- In [email protected], "djhatrick" <djhatr...@...> wrote:
>
> This is interesting, a hack, I created a uiTextField, on my component, and on
> an interval, check the height of the uiTextField and use the height of the
> uiTextField to set my text/componenent's height, and it works.
>
> I'm hoping in Flex4, there's a better way to work with Text, although, I'm in
> a major Flex 3 project, a year long project, so it might be about 6 months
> before I take that dive.
>
> Thanks,
> Patrick
>
> --- In [email protected], "invertedspear" <invertedspear@> wrote:
> >
> > Not sure exactly what your trying to but might the getBounds() method help
> > you out?
> >
> > --- In [email protected], "djhatrick" <djhatrick@> wrote:
> > >
> > > is there anyway to find the number of textRows in a TEXT.
> > >
> > > I can't seem to get my text to measure properly, it's anywhere between
> > > 5 and 80 pixels off. It's a subject of much frustration, unfortunately,
> > > the the Text component has a lot of protected properties.
> > >
> > > Any suggestions on a free component as a replacement, etc.
> > >
> > > Thanks,
> > > Patrick
> > >
> >
>