Flex 4.x Spark组件获取TextArea的行数To get the number of lines call the following code in the chang
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();
