Bind bindable variable to RadioButton : RadioButton « Components « Flex






Bind bindable variable to RadioButton

Bind bindable variable to RadioButton
       

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
  <mx:Panel title="Simple Months" width="100%" height="100%" 
            paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10" 
            layout="horizontal">
        <mx:HBox>
            <mx:Script>
                
                    import mx.controls.Image;
                    
                    [Bindable]
                    public var myId:String = "id";
                    [Bindable]
                    public var myImage:String = "image";
                    [Bindable]
                    public var myGroupName:String = "group";
                    [Bindable]
                    public var myLabel:String;
                    
              
            </mx:Script>
            <mx:RadioButton groupName="{this.myGroupName}" label="{this.myLabel}" />
            <mx:Image source="{this.myImage}" />
            <mx:Label text="{this}" />
        </mx:HBox>
  </mx:Panel>
</mx:Application>

   
    
    
    
    
    
    
  








Related examples in the same category

1.Add RadioButton to RadioButtonGroupAdd RadioButton to RadioButtonGroup
2.RadioButton click eventRadioButton click event
3.RadioButton default valueRadioButton default value
4.Define RadioButton control with Define RadioButton control with <mx:RadioButton>
5.Create RadioButton group using the RadioButtonGroup controlCreate RadioButton group using the RadioButtonGroup control
6.Bind RadioButton to ModelBind RadioButton to Model
7. and three <mx:RadioButtonGroup/> and three <mx:RadioButton/>
8.Change Image value by using RadioButtonChange Image value by using RadioButton
9.Create a RadioButtonGroup and put RadioButton into itCreate a RadioButtonGroup and put RadioButton into it
10.Use radio button to change stateUse radio button to change state
11.Use style to change font size and weight for RadioButton and LabelUse style to change font size and weight for RadioButton and Label
12.RadioButton with group nameRadioButton with group name