Tkinter menu widget: command to hide menu Tkinter menu widget: command to hide menu tkinter tkinter

Tkinter menu widget: command to hide menu


Luckily I think I found the source of this misbehaviour. After configuring the menu, another window (a custom made warning message) is displayed. To force the user to pay attention to that message, the focus was given to it, and the application was forced to wait (using the wait_window" method) until the user closes it. The "wait_window" was causing the issue, because it was not allowing the mainloop to hide the menu since it was waiting for the closing of the warning window, but somehow it is not possible to close the window without the menu hides first. It is a kind of "priority conflict" situation.

enter image description here

The solution was not use that method, and the menu closes as desired.

I think this may be usefull to anyone getting this trouble in the future