0

I have a combobox with multi selection. when i click on add button, which ever data is selected in the Combobox, those data has to be displayed in the another comboBox.

Please check the code and Can anyone of you please help me on this.

<mx:HBox>
 <mx:Label width="140" text="{resourceManager.getString   ('resources', 'settings_configuration_database_select_object_instance')}"/>
     <mx:List id="obj_instance" enabled="true" allowMultipleSelection="true" width="164" height="70"/>      
     <mx:Spacer width="20"/>
     <mx:Button label=">>"/>
     <mx:List id="selected_instance" enabled="true" allowMultipleSelection="true" width="164" height="70"/>
</mx:HBox>      

Thanks, Ravi

RKCY
  • 4,095
  • 14
  • 61
  • 97

1 Answers1

1

What about:

<ov:HPButton label=">>">
    <ov:click><![CDATA[
        for each (var item:* in obj_instance.selectedItems)
            selected_instance.dataProvider.addItem(item);
    ]]></ov:click>
</ov:HPButton>

Of course, you'll have to make sure that the dataProvider of instance is something reasonable (like an ArrayCollection)…

David Wolever
  • 148,955
  • 89
  • 346
  • 502