Mega Code Archive

 
Categories / Flex / Components
 

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>