2022-05-12 23:55:28 +03:00
|
|
|
import customtkinter
|
|
|
|
|
2022-05-22 21:26:31 +03:00
|
|
|
app = customtkinter.CTk()
|
|
|
|
app.geometry("400x240")
|
2022-05-12 23:55:28 +03:00
|
|
|
|
|
|
|
|
|
|
|
def button_function():
|
|
|
|
|
2022-05-22 21:26:31 +03:00
|
|
|
top = customtkinter.CTkToplevel(app)
|
2022-05-12 23:55:28 +03:00
|
|
|
|
2022-05-22 21:26:31 +03:00
|
|
|
app.after(1000, top.iconify) # hide toplevel
|
|
|
|
app.after(1500, top.deiconify) # show toplevel
|
|
|
|
app.after(2500, app.iconify) # hide app
|
|
|
|
app.after(3000, app.deiconify) # show app
|
|
|
|
app.after(4000, app.destroy) # destroy everything
|
2022-05-12 23:55:28 +03:00
|
|
|
|
|
|
|
|
2022-05-22 21:26:31 +03:00
|
|
|
button = customtkinter.CTkButton(app, command=button_function)
|
2022-05-12 23:55:28 +03:00
|
|
|
button.pack(pady=20, padx=20)
|
|
|
|
|
2022-05-22 21:26:31 +03:00
|
|
|
app.mainloop()
|