3 Replies Latest reply on Sep 25, 2011 10:14 PM by r4raghs

    Problem with numLines in TextArea ?!?!?!?

    r4raghs Level 1

      [Bindable] private var htmlStr:String='<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">enter text here 1</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">enter rtet here 2</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="1">enter rtet here 3</FONT></P></TEXTFORMAT>';

       

                                    protected function textarea1_mouseOverHandler(event:MouseEvent):void

                                    {

                                                   trace(txtArea.mx_internal::getTextField().numLines);

                                    }

       

      <mx:TextArea id="txtArea" htmlText="{htmlStr}" mouseOver="textarea1_mouseOverHandler(event)"/>

       

       

      Number of text line shown as 4. But It has only 3 line of text.

       

      How it could be? any help?