首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > flex >

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

2013-11-22 
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();

热点排行