python tkinter close gui window
from tkinter import *
root=tk.Tk()
root.destroy()
python tkinter close gui window
from tkinter import *
root=tk.Tk()
root.destroy()
Python TKinter simple GUI with quit button
import tkinter as tk
from tkinter import ttk
# Create the application window
window = tk.Tk()
# Create the user interface
my_label = ttk.Label(window, text="Hello World")
my_label.grid(row=1, column=1)
quit_button = ttk.Button(window, text="Quit")
quit_button.grid(row=2, column=1)
quit_button['command'] = window.destroy
# Start the GUI event loop
window.mainloop()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us