Use changeEvent to display value : ComboBox Event « Components « Flex

Use changeEvent to display value

Use changeEvent to display value

<?xml version="1.0"?>
<mx:Application xmlns:mx="">
        private function dropEvt(event:DropdownEvent):void {
            forChange.text+=event.type + "\n";
        private function changeEvt(event):void {
            forChange.text=event.currentTarget.selectedItem.state + " " + + " " + event.currenttarget.selectedIndex;

    <mx:ComboBox open="dropEvt(event)" close="dropEvt(event)"
        change="changeEvt(event)" labelField="state">
            <mx:Object state="A" capital="AA" />
            <mx:Object state="B" capital="BB" />
            <mx:Object state="C" capital="CC" />
    <mx:TextArea id="forChange" width="150" height="100%" />


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 event and change event for ComboBoxopen event and change event for ComboBox
5.ComboBox change eventComboBox change event
6.Information from ComboBox eventsInformation from ComboBox events