LABEL 怎么自动换行啊?
myLabel.width=500
但是 由于内容太长? 会被自动撑开,并且不会换行
l.mx_internal::getTextField().wordWrap = true;
<mx:Script>
? <![CDATA[
?? [Bindable]
?? private var str:String? = "";
?? private function startTest():void
?? {
??? l.mx_internal::getTextField().wordWrap = true;
??? str = "123456789123456789";
?? }
??
? ]]>
</mx:Script>
<mx:Button click="{startTest()}"/>
<mx:Label id="l" x="199" y="163" width="70" text="{str}" height="51"/>
?
Flex中label换行
在as中赋值 label.text="aaaaa rn bbbbbbb"
在mxml中赋值 text="aaaaaa bbbbbbb"
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
????? xmlns:s="library://ns.adobe.com/flex/spark"
????? xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
<fx:Declarations>
?? <!-- Place non-visual elements (e.g.,services,value objects) here -->
</fx:Declarations>
<s:Label x="140" y="134" text="标 签 换 行" width="31" height="107" backgroundColor="#C7E09F" fontSize="15" buttonMode="true" mouseChildren="false"/>
</s:Application>
?
?http://hi.baidu.com/miracle5460/blog/item/50aacd100f47320a203f2e48.html
http://bbs.airia.cn/thread-6038-1-1.html