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.controls.TextArea;
public class NumLinesTextArea extends TextArea
{
public function NumLinesTextArea()
{
super();
}
public function get textFieldNumLines():int
{
if(textField != null)
{
return textField.numLines
}
return 1;
}
}
}
--- In [email protected], "djhatrick" <djhatr...@...> 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
>