Превышены лимиты рекурсии
Я ломал голову, искал ответ, но не нашёл.
Я знаю, что mainloop()
превращается в цикл, который вызывает цикл и т.д.
Но как это решить?
class login(Tk):
def __init__(self):
self.geometry('900x600')
self.resizable(width=False, height=False)
self.title('1')
#bar
frame_photo = PhotoImage(file = 'images/menu.png')
frame_lable = Label(self, image = frame_photo)
frame_lable.pack()
def started_reg():
self.withdraw()
registration()
#image list
button_image_log = PhotoImage(file = 'images/button_log.png')
button_image_reg = PhotoImage(file = 'images/button_reg.png')
#buttons
create_button_1 = Button(self,
image = button_image_log,
border = 0,
bg = rgb((255,255,255)),
#command = clicked_log,
activebackground = rgb((255,255,255)))
create_button_1.place(x = 522, y = 410)
create_button_2 = Button(self,
image = button_image_reg,
border = 0,
bg = rgb((255,255,255)),
command = started_reg(),
activebackground = rgb((255,255,255)))
create_button_2.place(x = 522, y = 464)
#boxEntry
login = Entry(self,
font = ('Golos Text Regular', 15),
bg = rgb((232, 232, 232)),
width = 25,
borderwidth=0)
login.place(x = 529, y = 218)
passwsord = Entry(self,
font = ('Golos Text Regular', 15),
bg = rgb((232, 232, 232)),
width = 25,
borderwidth=0)
passwsord.place(x = 529, y = 314)
startedlogin = login()
startedlogin.mainloop()
Источник: Stack Overflow на русском