How to get the line count of content of the Spark TextArea
I want to get the line count of the spark 开发者_JAVA技巧text area content.
Please help me.
In this site you can find a working example : http://blog.flexexamples.com/2008/05/08/determining-the-number-of-lines-in-a-textarea-control-in-flex/
and the same is explained here: http://blog.flexexamples.com/2010/01/13/determining-the-number-of-lines-in-a-spark-richeditabletext-control-in-flex-4/
hope it help.
A way to read the number of lines for a Spark Label is to import the mx_internal namespace like
use namespace mx_internal;
and then access the textLines property of the label like the following:
var numLines : int = myLabel.mx_internal::textLines.length;
精彩评论