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>
1. | Fill ArrayCollection to a DropDownList | ||
2. | Get current selected value from DropDownList | ||
3. | Trigger the drop down of DropDownList | ||
4. | DropDownList control with prompt message |