Deactivating/Activating of menu item with a sub menu
Hello! How can I activate a menu item after it was deactivated by setting the callback to None? For menu items with dedicated callback functions it's clear. But what if I have a menu item used only as parent item for sub menu?
- Active
- Port > Port 1, Port 2
- Quit
So "Port" has two children. If Active is clicked I would like to deactivate the Item "Port". When Active is clicked the second time, Port should be activated again. But therefore I'm missing the callback.
Hello! This response will be very out of date, hopefully you've solved your problem since then!
If you get the object of the Menu Item, through memory storage or retrieval from the root menu, you should be able to say menuitem.set_callback as described here in the docs