小小菜鸟的web菜园子

web开发学习。好记性不如烂笔头。每天进步一点点!

导航

设置List控件的文本对齐方式.

List控件的textAlign样式学习.
示例:

代码:
 
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/03/changing-the-text-alignment-of-a-list-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="middle"
        backgroundColor
="white">

    
<mx:Array id="arr">
        
<mx:Object label="One" />
        
<mx:Object label="Two" />
        
<mx:Object label="Three" />
        
<mx:Object label="Four" />
        
<mx:Object label="Five" />
        
<mx:Object label="Six" />
    
</mx:Array>

    
<mx:ApplicationControlBar dock="true">
        
<mx:Form styleName="plain">
            
<mx:FormItem label="textAlign:">
                
<mx:ComboBox id="comboBox"
                        dataProvider
="[left,center,right]" />
            
</mx:FormItem>
        
</mx:Form>
    
</mx:ApplicationControlBar>

    
<mx:List id="list"
            dataProvider
="{arr}"
            textAlign
="{comboBox.selectedItem}"
            width
="100" />

</mx:Application>

源码:http://blog.flexexamples.com/wp-content/uploads/List_textAlign_test/bin/srcview/index.html

来自:http://blog.flexexamples.com/2008/06/03/changing-the-text-alignment-of-a-list-control-in-flex/

posted on 2008-06-05 12:02  『小小菜鸟』  阅读(763)  评论(0编辑  收藏  举报