Jitendra Jadav
Jitendra Jadav

Reputation: 603

Combobox's Dynamic event in flex

I am using flex when i was select combobox item i want to create new form for eg. when i select 1 it will appear one form when i select 2 it will appear two.so and so....

Upvotes: 1

Views: 488

Answers (1)

cliff.meyers
cliff.meyers

Reputation: 17734

Put your Forms inside of a ViewStack container. You can then bind the ViewStack's selectedIndex to the selectedIndex of your ComboBox:

<mx:ComboBox id="comboBox" />

<mx:ViewStack selectedIndex="{comboBox.selectedIndex}">
    <mx:Form id="formA">
        ...
    </mx:Form>
    <mx:Form id="formB">
        ...
    </mx:Form>
</mx:ViewStack>

Upvotes: 1

Related Questions