problem description
just learned python GUI, using tkinter
when you use a button
of Tk ()
to open a Toplevel
, you can generally open it indefinitely. How to automatically close the toplevel
before creating a new project?
my gui looks like this:
()
button
(),destroy()
,Toplevel
,button
- one way to realize automation is to check whether the focus is in this window. If not,
destroy ()
, but don"t know how to do it.bind
can only be used for controls