Answer the question
In order to leave comments, you need to log in
How to close modal window on event?
Please help me to close the modal window when clicking on the butReset button.
from tkinter import *
root = Tk()
root.geometry("500x500")
def reset():
#win.destroy()
pass
def modal():
win = Toplevel(root)
butReset = Button(win, text = 'close modal win', command = reset())
butReset.pack()
button = Button(root, text = 'open modal', command = modal)
button.pack()
root.mainloop()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question