views:

56

answers:

2

How do I get 2 synchronized comboboxes so that changing the index of the one automatically changes the other one.

+1  A: 

I have no idea what language you are using, but for something like .NET you would go into the SelectedIndexChanged event of the comboboxes and in there put:

Combobox1.SelectedIndex = ComboBox2.SelectedIndex and vice versa for the other one.

Note: You want to make sure that your boxes have the AutoPostback property set to True.

TheTXI
A: 

This depends on the framework/language/toolkit/platform, and many other features, but the basic idea is the same:

Just listen in for the "selected item changed" event/signal/etc on both combo boxes, and when one changes, set the other appropriately.

Reed Copsey