mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
changed root_tk name to app in all exmaples and tests
This commit is contained in:
@@ -41,17 +41,17 @@ import customtkinter
|
||||
customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark
|
||||
customtkinter.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green
|
||||
|
||||
root_tk = customtkinter.CTk() # create CTk window like you do with the Tk window
|
||||
root_tk.geometry("400x240")
|
||||
app = customtkinter.CTk() # create CTk window like you do with the Tk window
|
||||
app.geometry("400x240")
|
||||
|
||||
def button_function():
|
||||
print("button pressed")
|
||||
|
||||
# Use CTkButton instead of tkinter Button
|
||||
button = customtkinter.CTkButton(master=root_tk, text="CTkButton", command=button_function)
|
||||
button = customtkinter.CTkButton(master=app, text="CTkButton", command=button_function)
|
||||
button.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER)
|
||||
|
||||
root_tk.mainloop()
|
||||
app.mainloop()
|
||||
```
|
||||
which gives the following (macOS dark mode on):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user