flex中RichText的一个小例子
时间:2011-03-29 来源:aodixius
代码 <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2009/05/27/truncating-text-with-the-spark-richtext-control-in-flex-gumbo/ --> <s:Application name="Spark_RichText_truncation_test" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/halo" xmlns:s="library://ns.adobe.com/flex/spark" viewSourceURL="srcview/index.html"> <mx:ApplicationControlBar width="100%" cornerRadius="0"> <mx:Form styleName="plain"> <mx:FormItem label="truncation:"> <s:HSlider id="slider" minimum="-1" maximum="22" liveDragging="true" /> </mx:FormItem> </mx:Form> </mx:ApplicationControlBar> <s:RichText id="richText" truncation="{slider.value}" width="200" horizontalCenter="0" verticalCenter="0"> <s:text><fx:String source="dummy.txt" /></s:text> </s:RichText> </s:Application>
相关阅读 更多 +