Replies: 1 comment
-
|
`import customtkinter as ctk Configuración inicial de CustomTkinter Funciones para cambiar el tema def set_light_theme(): Crear la ventana principal Crear el menú con CTkMenuBar Crear un botón para el menú de temas Crear un menú desplegable para el botón de temas Crear el Notebook con pestañas verticales Añadir pestañas ----- Contenido de la pestaña de Tabla ----- Crear la tabla con CTkTabletable = CTkTable(notebook.tab("Tabla"), row=4, column=3, values=data, colors=["#2c2f33", "#23272a"]) ----- Contenido de la pestaña de Formulario ----- Título del formulario Campo de usuario Campo de contraseña Botón de inicio de sesión ----- Contenido de la pestaña de Información ----- label_info = ctk.CTkLabel(notebook.tab("Información"), text=info_text, justify="left", font=("Arial", 12), wraplength=400) Iniciar la aplicaciónapp.mainloop() |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
just want to ask if there is an way how to CTkTble is handling "light/dark" theme? Asking for specifically in relation to native CustomTkinter Widgets where atributes can be tuple (light / dark).
Example:
CTKButton - atribute: "fg_color" --> forground color, tuple: (light_color, dark_color) or single color or "transparent" link
CTkTable - atribure: "colors" --> set two fg_colors for the table (list), eg: colors=["yellow", "green"] link
Is there a way how to setup/update CTkTable same way to reflect by color setup themes like native CustomTkinter Widgets?
results now when switching from Dark to Light:

Dark Theme:
Switched to Light Theme:

--> see CTKFrame, CTkScrollableFrame changed colors based on attributes but table unfortunately not
Thank you
Jan Vaško
Beta Was this translation helpful? Give feedback.
All reactions