小小菜鸟的web菜园子

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

导航

设置RadioButton控件中文本的位置.

RadioButton控件的labelPlacement属性.
 示例:

代码:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/19/setting-the-label-placement-on-a-radiobuttongroup-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout
="vertical"
        verticalAlign
="middle"
        backgroundColor
="white">

    
<mx:ApplicationControlBar dock="true">
        
<mx:Form styleName="plain">
            
<mx:FormItem label="labelPlacement:">
                
<mx:ComboBox id="comboBox"
                        dataProvider
="[left, right, top, bottom]"
                        selectedIndex
="1" />
            
</mx:FormItem>
        
</mx:Form>
    
</mx:ApplicationControlBar>

    
<mx:RadioButtonGroup id="radioGroup"
            labelPlacement
="{comboBox.selectedItem}" />

    
<mx:HBox horizontalAlign="left" verticalGap="15">
        
<mx:RadioButton id="radioButton1"
                label
="Red"
                group
="{radioGroup}"
                opaqueBackground
="0xFF00FF" />
        
<mx:RadioButton id="radioButton2"
                label
="Orange"
                group
="{radioGroup}"
                opaqueBackground
="0xFF00FF" />
        
<mx:RadioButton id="radioButton3"
                label
="Yellow"
                group
="{radioGroup}"
                opaqueBackground
="0xFF00FF" />
        
<mx:RadioButton id="radioButton4"
                label
="Green"
                group
="{radioGroup}"
                opaqueBackground
="0xFF00FF" />
        
<mx:RadioButton id="radioButton5"
                label
="Blue"
                group
="{radioGroup}"
                opaqueBackground
="0xFF00FF" />
    
</mx:HBox>

</mx:Application>

posted on 2008-07-05 10:32  『小小菜鸟』  阅读(1982)  评论(0编辑  收藏  举报