读书人

Flex 四.x Spark组件获取TextArea的行

发布时间: 2013-11-22 23:06:19 作者: rapoo

Flex 4.x Spark组件获取TextArea的行数

To get the number of lines call the following code in the change event handler of a Text control, My text area control is called taControl.

var nLines:uint=taControl.mx_internal::getTextFlow().flowComposer.numLines;

if(nLines>3)
{
Alert.show("Maximum of three lines of text is allowed for a project Topic");
}

?

?

?

或者:

txtArea.textFlow.flowComposer.numLines.toString();

读书人网 >flex

热点推荐