CustomTkinter/test/test_iconify_destroy.py

18 lines
420 B
Python
Raw Normal View History

2022-05-06 15:33:38 +03:00
import tkinter
import customtkinter
root_tk = customtkinter.CTk()
root_tk.geometry("400x240")
def button_function():
root_tk.iconify()
root_tk.after(1000, root_tk.deiconify)
root_tk.after(2000, root_tk.destroy)
frame = tkinter.Frame()
frame.pack(padx=10, pady=10, expand=True, fill="both")
button = customtkinter.CTkButton(frame, command=button_function)
button.pack(pady=20, padx=20)
root_tk.mainloop()