Flex TextArea滚动到底部

<mx:Script>
    
<![CDATA[
    
        
this.textarea.addEventListener(FlexEvent.VALUE_COMMIT,onValueCommit);

        private function onValueCommit(event:FlexEvent):void{ 

    this.textarea.validateNow(); 

            this.textarea.verticalScrollPosition=this.textarea.maxVerticalScrollPosition;
        }
    ]]
>
</mx:Script>


<mx:TextArea left="2" right="2" top="2" bottom="28" fontSize="12" editable="false" id="textarea">
    
<mx:htmlText>
        
<![CDATA[<b><font color='#FF0000'>Welcome to Flexchat!</font></b>]]>
    
</mx:htmlText>

</mx:TextArea>


posted @ 2009-12-14 10:51  echozhjun  阅读(1182)  评论(3编辑  收藏  举报