changed root_tk name to app in all exmaples and tests

This commit is contained in:
Tom Schimansky
2022-05-22 20:26:31 +02:00
parent 0c7abdaec5
commit 8cafed1b06
21 changed files with 124 additions and 130 deletions

View File

@@ -1,22 +1,21 @@
import tkinter
import customtkinter
root_tk = customtkinter.CTk()
root_tk.geometry("400x240")
app = customtkinter.CTk()
app.geometry("400x240")
def button_function():
top = customtkinter.CTkToplevel(root_tk)
top = customtkinter.CTkToplevel(app)
root_tk.after(1000, top.iconify) # hide toplevel
root_tk.after(1500, top.deiconify) # show toplevel
root_tk.after(2500, root_tk.iconify) # hide root_tk
root_tk.after(3000, root_tk.deiconify) # show root_tk
root_tk.after(4000, root_tk.destroy) # destroy everything
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
button = customtkinter.CTkButton(root_tk, command=button_function)
button = customtkinter.CTkButton(app, command=button_function)
button.pack(pady=20, padx=20)
root_tk.mainloop()
app.mainloop()