Skip to content Skip to sidebar Skip to footer

Tkinter: No Input Possible After Messagebox Is Called

I want to call a messagebox (with messagebox.showwarning) at the start of my program to inform the user about something. When the user clicks on 'Ok', a GUI opens. There the user c

Solution 1:

You need to call root.wait_visibility() or root.update() before showing the message box:

root.wait_visibility()  # or root.update()
messagebox.showwarning("Warning", "Some Serious Warning.")

Or get the focus using foucs_force() after showing the message box:

messagebox.showwarning("Warning", "Some Serious Warning.")
root.focus_force()

Post a Comment for "Tkinter: No Input Possible After Messagebox Is Called"