Enable a Group by checking a DropDownList selection : DropDownList « Components « Flex






Enable a Group by checking a DropDownList selection

Enable a Group by checking a DropDownList selection
         
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:s="library://ns.adobe.com/flex/spark"
    creationComplete="handleCreationComplete();">
    <mx:Script>
        
            import mx.collections.ArrayCollection;
            import spark.core.MaskType;
            
            [Bindable] public var masks:ArrayCollection;
            private function handleCreationComplete():void
            {
                masks = new ArrayCollection( [ MaskType.CLIP,MaskType.ALPHA,MaskType.LUMINOSITY ] );
                maskList.selectedIndex = 0;
            }
      
    </mx:Script>
    <s:DropDownList id="maskList" dataProvider="{masks}" />

    <s:Group enabled="{maskList.selectedItem==MaskType.LUMINOSITY}">
        <s:layout>
            <s:HorizontalLayout />
        </s:layout>
        <mx:CheckBox label="A" />
        <mx:CheckBox label="B" />
    </s:Group>
    
</mx:Application>

   
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Fill ArrayCollection to a DropDownListFill ArrayCollection to a DropDownList
2.Get current selected value from DropDownListGet current selected value from DropDownList
3.Trigger the drop down of DropDownListTrigger the drop down of DropDownList
4.DropDownList control with prompt messageDropDownList control with prompt message