0

I am trying to make a python program in tkinter that has 3 drop down menus. The values of the second and 3rd menu need to change based on the value chosen on the first menu. For example:

menu1= [1 , 2]

if 1 is chosen:

menu2 = [2 , 3]

if 2 is chosen:

menu2 = [4, 5]

I hope this makes since and as always thank you for the help!

Austin Reed
  • 37
  • 1
  • 6
  • 1
    Does this answer your question? [Change OptionMenu based on what is selected in another OptionMenu](https://stackoverflow.com/questions/17252096/change-optionmenu-based-on-what-is-selected-in-another-optionmenu) – stovfl Dec 21 '19 at 12:52
  • Kind of. But how would this work in a context where you have 3 drop down menus instead of two? – Austin Reed Dec 21 '19 at 14:04
  • The same, option 2 provides the value for the third `Optionmenu` and so on ... – stovfl Dec 21 '19 at 14:06
  • self.dict = {'Asia': ['Japan', 'China', 'Malaysia'], 'Europe': ['Germany', 'France', 'Switzerland']} So i would add another element to this dict or would i make a new dict? – Austin Reed Dec 21 '19 at 14:12
  • for example {'North America': ['usa': [alabama, kansas] 'canada':[alberta, quebec]]} – Austin Reed Dec 21 '19 at 14:14
  • Or am i doing it wrong..? – Austin Reed Dec 21 '19 at 14:14
  • ***"Or am i doing it wrong..?***: Yes, don't comment code, [edit] your question instead and move it into the question. – stovfl Dec 21 '19 at 14:21

0 Answers0