2 Replies Latest reply on May 25, 2007 4:22 AM by flashdumber

    multiple comboboxes


      I am populating two comboxes one with state names and the other with city names from a simple xml file using xmlconnector. If I click on a state name in the first combo box then its corresponding city names populate correctly in the second combobox.

      Now I added three buttons on the layer and added the code to change the selectedindex of the first combobox in the button's onclick event. When I click the button the first combobox correctly changes brings up the state name but the second combobox doe not change. i.e. the second combobox populates the cities only on user doing a mouse clicking on the state names. Everywhere in Adobe docs it says 'user change' but not through 'code change'

      What is wrong ? Is there a way to get around this ?

      the data in a simple xml is

      New York


      Any help very much appreciated.

        • 1. Re: multiple comboboxes
          It will be hard to tell what's going on without seeing the code you've written to "change the selectedindex of the first combobox" and so forth.
          • 2. Re: multiple comboboxes
            flashdumber Level 1
            I have two comboboxes and two buttons. Both comboboxes are populated with states array and cities array using the xmlconnector.

            The button has

            on Click {
            this._parent.cbStates.SelectedIndex = 1;

            When you click the button the states combobox reflects correctly with the correct state name but then the cities combobox does not change the cities list.

            But if you do a direct mouse click on the states dropdown then the cities populate correctly in the cities combobox.

            There is no code except this line in the button as I have used the xmlconnector to load the two comboboxes and link them from the bindings.