I have this very basic code
from tkinter import *
class GUI(Tk):
def __init__(self):
super().__init__()
self.geometry('600x400')
Button(self, text="Show new window", command=self.show_window).pack()
def show_window(self):
smallwin = display()
class display(Toplevel):
def __init__(self):
super().__init__()
self.geometry('300x300+30+30')
self.attributes('-topmost',True)
root = GUI()
root.mainloop()
When you click on the button, a child window appears. When you press it again, a second child window appears etc etc, BUT each new window is to the right and further down from the last one.
I would like to know if this automatic behavior can be turned off?