I have created a topLevel widget and was wondering if there was a way to position the new window relative to the root window.
I have created a topLevel widget and was wondering if there was a way to position the new window relative to the root window.
You can skip getting/setting the dialog width/height and set only its X, Y position:
x = root.winfo_x()
y = root.winfo_y()
toplevel.geometry("+%d+%d" % (x + 100, y + 200)))
Replace 100 and 200 with relative X, Y to your root window.