Skip to content
Advertisement

Nested Combo Menus in PySimpleGui

I’m looking for a drop down menu system to help control the flow for a variety of locations.

The structure would look like this

JavaScript

I looked into Menus but that will force to the top of the window regardless of placement in the layout. I tried to throw the menu code (basically what you see above) as a combo and it just displayed all as one.

To get to the point of the question: Is there a way to do nested combo menus in pysimplegui, or do I need to do something else. And if so, what should should I be looking at for a reference?

Advertisement

Answer

Try ButtonMenu element, you can add “keys” to make menu items unique or as another way of identifying a menu item than the text shown. The key is added to the text portion by placing :: after the text.

Menu Item::key

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement