-1

I am looking to create a combo box in GTK where the user selected choice in the first box changes the choices available in the next boxes; ie if the first box contained manufacturers names, the next box would contain products of that manufacture, furthering that example if I selected bmw I could only select cars made by bmw. I know what the basic structure should look like, however I am not sure how to have the signals trigger one another. If someone could provide basic code or pseudo code that would be perfect .

Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
Connor
  • 3
  • 1

2 Answers2

0

The easiest solution would be to have one manufacturer model and many product models. When manufacturer is changed, combobox will emit "changed" signal. In it's handler you can set appropriate model to the second combobox using set_model() method.

Alexander Dmitriev
  • 2,483
  • 1
  • 15
  • 20
-1

You can find a simple example in 14.1. at provided link: http://python-gtk-3-tutorial.readthedocs.io/en/latest/combobox.html

naj meh
  • 26
  • 1
  • 3
  • I know how to use the combo box for multiple individual drop downs but that’s not what I’m looking for. I need the 2nd drop down options list to be dependent on the drop down from the first – Connor Jun 08 '18 at 23:01