Actionscript 3 如何自动调整文本区域';当我给它一些默认值时,它在flex中的高度是多少

Actionscript 3 如何自动调整文本区域';当我给它一些默认值时,它在flex中的高度是多少,actionscript-3,apache-flex,actionscript,Actionscript 3,Apache Flex,Actionscript,加载父组件时,我给textarea一个默认值,我想让textarea用该值自动调整其高度。守则如下: protected function commentContentGroup_creationCompleteHandler(event:FlexEvent):void { // TODO Auto-generated method stub userCommentContent.addEventListen

加载父组件时,我给textarea一个默认值,我想让textarea用该值自动调整其高度。守则如下:

protected function commentContentGroup_creationCompleteHandler(event:FlexEvent):void
            {
                // TODO Auto-generated method stub
                userCommentContent.addEventListener(KeyboardEvent.KEY_DOWN, sendInfor);
                scrollerContentHieght=20;
                commentContentGroupHeight=this.height;
                userCommentContent.addEventListener(TextEvent.TEXT_INPUT, userCommentContent_textInputHandler);
                userCommentContent.addEventListener(TextOperationEvent.CHANGE, userCommentContent_changeHandler);
//              userCommentContent.addEventListener(TextEvent.TEXT_INPUT,userCommentContent_changeHandler);
                this.userCommentContent.text = "The Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget";

            }

我认为更改事件未触发。

如果您想在每次显示组件时指定高度(添加到显示列表),则可以使用
事件。添加到_STAGE
。如果只需要一次,那么创建完成就足够了。如果您需要更多帮助,请粘贴完整的代码