[flexcoders] Re: mx.controls.Text

2009-12-23 Thread valdhor
I had the same problem. TextArea has a protected property on the textField named numLines that would suffice. To get at it you need to create your own sub class of TextArea and create a getter for that protected property. Something like the following should do it... package { import mx.contro

[flexcoders] Re: mx.controls.Text

2009-12-23 Thread invertedspear
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{ ca

[flexcoders] Re: mx.controls.Text

2009-12-23 Thread djhatrick
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

[flexcoders] Re: mx.controls.Text

2009-12-22 Thread invertedspear
Not sure exactly what your trying to but might the getBounds() method help you out? --- In flexcoders@yahoogroups.com, "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 of