customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark
AttributeError: module 'customtkinter' has no attribute 'set_appearance_mode'
import customtkinter
customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark
customtkinter.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green
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=app, text="CTkButton", command=button_function)
button.place(relx=0.5, rely=0.5, anchor=customtkinter.CENTER)
app.mainloop()
Может ли кто-нибудь мне помочь? Я использую Python версии 3.7 в PyCharm.
У меня возникла ошибка в коде шаблона. Ошибка: [code] customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark AttributeError: module 'customtkinter' has no attribute 'set_appearance_mode' [/code] Код: [code]import customtkinter
customtkinter.set_appearance_mode("System") # Modes: system (default), light, dark customtkinter.set_default_color_theme("blue") # Themes: blue (default), dark-blue, green
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=app, text="CTkButton", command=button_function) button.place(relx=0.5, rely=0.5, anchor=customtkinter.CENTER)
app.mainloop() [/code] Может ли кто-нибудь мне помочь? Я использую Python версии 3.7 в PyCharm.