The messagebox by default opens in the center of the screen:
But I would like it to open at the bottom right of the screen:
My original code:
from tkinter import Tk
from tkinter.messagebox import Message
from _tkinter import TclError
TIME_TO_WAIT = 1000
root = Tk()
root.withdraw()
try:
root.after(TIME_TO_WAIT, root.destroy)
Message(title="Visual Studio Code", message="New Match Found", master=root).show()
except TclError:
pass
As per indications, I tried using root.geometry but realized that it doesn't work for messagebox, only for standard box:
root = Tk()
x = 1000
y = -1000
root.geometry(f'250x150+{x}+{y}')
root.withdraw()
# rest of code...
Prints dedicated to Claudio's answer (to help understand our debate):




The code below works on my system displaying the message box in the right bottom corner of the display. The 'trick' is that the messagebox hoovers over the parent window, so the appropriate setting of root.geometry() causes it to appear where the root window is placed on the screen. You have found it out by yourself already, but the root.withdraw() prevented the expected placement of the messagebox: