open event and change event for ComboBox : ComboBox Event « Components « Flex






open event and change event for ComboBox

open event and change event for ComboBox
       

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        private function openEvt():void {
            forChange.text="";
        }
        private function changeEvt(e:Event):void {
            forChange.text=e.currentTarget.value + " " + e.currentTarget.selectedIndex;
        }
      </mx:Script>
    <mx:ComboBox open="openEvt()" change="changeEvt(event)">
        <mx:dataProvider>
            <mx:Array>
                <mx:String>AK</mx:String>
                <mx:String>AL</mx:String>
                <mx:String>AR</mx:String>
            </mx:Array>
        </mx:dataProvider>
    </mx:ComboBox>
    <mx:TextArea id="forChange" width="150" />
</mx:Application>

   
    
    
    
    
    
    
  








Related examples in the same category

1.Open event for ComboBoxOpen event for ComboBox
2.Close event for ComboBoxClose event for ComboBox
3.Change event for ComboBoxChange event for ComboBox
4.Use changeEvent to display valueUse changeEvent to display value
5.ComboBox change eventComboBox change event
6.Information from ComboBox eventsInformation from ComboBox events