🛠️ [fix] small mistake in the README example code

This commit is contained in:
Dishant B 2023-06-15 16:07:18 -07:00 committed by GitHub
parent abe33f7e81
commit 10d5cd4c2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,7 +56,6 @@ The **official** documentation can be found here:
## Example Program ## Example Program
To test customtkinter you can try this simple example with only a single button: To test customtkinter you can try this simple example with only a single button:
```python ```python
import tkinter
import customtkinter import customtkinter
customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark
@ -70,7 +69,7 @@ def button_function():
# Use CTkButton instead of tkinter Button # Use CTkButton instead of tkinter Button
button = customtkinter.CTkButton(master=app, 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) button.place(relx=0.5, rely=0.5, anchor=customtkinter.CENTER)
app.mainloop() app.mainloop()
``` ```