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,12 +1,12 @@
import tkinter
import customtkinter # <- import the CustomTkinter module
import customtkinter
customtkinter.set_appearance_mode("dark") # Modes: "System" (standard), "Dark", "Light"
# customtkinter.set_default_color_theme("blue") # Themes: "blue" (standard), "green", "dark-blue"
customtkinter.set_default_color_theme("blue") # Themes: "blue" (standard), "green", "dark-blue"
root_tk = customtkinter.CTk() # create CTk window like you do with the Tk window (you can also use normal tkinter.Tk window)
root_tk.geometry("400x480")
root_tk.title("CustomTkinter Test")
app = customtkinter.CTk() # create CTk window like you do with the Tk window
app.geometry("400x480")
app.title("CustomTkinter simple_example.py")
def button_function():
@ -23,7 +23,7 @@ def check_box_function():
y_padding = 13
frame_1 = customtkinter.CTkFrame(master=root_tk, corner_radius=15)
frame_1 = customtkinter.CTkFrame(master=app, corner_radius=15)
frame_1.pack(pady=20, padx=60, fill="both", expand=True)
label_1 = customtkinter.CTkLabel(master=frame_1, justify=tkinter.LEFT)
@ -58,4 +58,4 @@ s_var = tkinter.StringVar(value="on")
switch_1 = customtkinter.CTkSwitch(master=frame_1)
switch_1.pack(pady=y_padding, padx=10)
root_tk.mainloop()
app.mainloop()