Here is my code:

import flash.geom.Rectangle;

var caretIndex:int = textArea.getTextField().caretIndex;
var Boundaries:Rectangle = new Rectangle;
var tField:TextField = textArea.getTextField();
    
Boundaries = tField.getCharBoundaries(caretIndex); 

but I'm getting error cause Boundaries in this case is Null object.

Help me please to get this thing working if You see errors..

--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> 
wrote:
>
> I'm not sure what you mean by "setting the number of lines in the
> TextArea component"? If you want to control where line breaks 
occur, put
> the \n character into the 'text' String.
> 
>  
> 
> To get the line position of a particular character try using
> getCharBoundaries() and then getLineIndexAtPoint().
> 
>  
> 
> - Gordon
> 
>  
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On
> Behalf Of brankosli
> Sent: Wednesday, October 18, 2006 1:09 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Lines in text area component
> 
>  
> 
> Is there any possibility to set number of lines in Text Area 
component?
> and if it's possible:
> How to retrieve current line position in Text Area component?
> 
> Thanx in advance.
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to