У меня проблема с кнопками tkinter.Фактически, когда моя первая часть закончена, открывается другое окно, в котором предлагается снова сыграть или закрыть окно.Но когда отображается это окно, отображается все, кроме кнопок, которые отображаются в другом окне.Я также отправляю вам скриншот проблемы и мой код.Помоги мне, пожалуйста!! Скриншот моей проблемы
def question():
global n
can.itemconfig(nvqst, text="Nouvelle question:", fill="white", font=("Helvetica", '11'))
if len(qst)<0:
return
if len(qst)==1:
fen2.destroy()
a=False
with open("score.txt","w") as storage:
storage.write(str(score))
fen=Toplevel()
fen.title("Quizz")
can2 = Canvas(fen, height=400, width=600, background='grey')
fichier=open('score.txt','r')
scorex=fichier.readline()
image=PhotoImage(file='fin.gif')
scorevarx=can2.create_text(330,200, text= scorex)
def start():
#exec(open("P:\Mes documents\projet bac\\test27.py").read())
exec(open("C:\\Users\\Mohand\\Desktop\\python\\test27.py").read())
can2.create_image(0, 0, image=image, anchor=NW)
can2.create_text(377, 110, text=score, anchor=W, font='arial')
a=Button(text='Rejouer', command=start, bg="#CDCCCD")
a.grid()
a.place(x=0, y=355, height= 25, width=605)
b=Button(text='Quitter', command=fen.destroy, bg="#CDCCCD")
b.grid()
b.place(x=0, y=380, height= 25, width=605)
can2.grid()
fen.mainloop()