Learn Before
Concept

Closing the window using button click

We can use the destroy() method to quit a window.

button = tk.Button(text="Quit", foreground="red", command=window.destroy) button.pack()

We can pass command=window.destroy as a parameter to close a window with a button click

Image 0

0

1

Updated 2021-05-12

Contributors are:

Who are from:

Tags

Python Programming Language

Data Science