This is the code snippet I use to create a menu in tkinter.
self.fileMenu = Menu(self.menu)
self.fileMenu.add_cascade(label="Open...", menu=openMenu)
self.fileMenu.add_cascade(label="Save...")
self.fileMenu.add_command(label="Reset", command=self.model.reset)
self.fileMenu.add_separator()
self.fileMenu.add_command(label="Exit", state='disabled')
At a point in my program I want to disable this menu (or its items), then display a messageBox and finally re-instate the menu.
I know that I can do each item individually with self.fileMenu.entryconfig("Open...", state='disabled')
.
How do I do it for all, without disabling each option individually?