0

I'm using TK Inter solely and exclusively to generate messagebox. However, I noticed that most of the times it is called it is behind other windows. Can you help me in putting together a code that guarantees that every time the messagebox is invoked it will be in front of all the other windows?

Below an example:

messagebox.showinfo('Error', \
f'Description error.')
Brandalize
  • 21
  • 6

1 Answers1

0

You must add the parent window as an argument :

messagebox.showinfo(title, message, parent)

This assures that the messagebox is displayed on top of it.

BTW, you would better use messagebox.showerror in your example.

Jack Griffin
  • 1,228
  • 10
  • 17