cambiar fuente letras solapa
This commit is contained in:
parent
e1b995c1a1
commit
6850ce72cc
|
@ -91,13 +91,18 @@ barra_estado = tk.Label(root, text="Barra de estado", bg="lightgray", anchor="w"
|
|||
barra_estado.grid(row=1, column=0, columnspan=3, sticky="ew")
|
||||
|
||||
# Notebook para las pestañas
|
||||
notebook = ttk.Notebook(frame_superior)
|
||||
|
||||
style = ttk.Style()
|
||||
style.configure("CustomNotebook.TNotebook.Tab", font=("Arial", 12, "bold"))
|
||||
notebook = ttk.Notebook(frame_superior, style="CustomNotebook.TNotebook")
|
||||
notebook.pack(fill="both", expand=True)
|
||||
|
||||
|
||||
# Crear cinco solapas
|
||||
for i in range(1, 6):
|
||||
tab = ttk.Frame(notebook)
|
||||
notebook.add(tab, text=f"Solapa {i}")
|
||||
|
||||
notebook.add(tab, text=f"Solapa {i}", padding=4)
|
||||
# Añadir un Label en cada solapa para diferenciarla
|
||||
label = ttk.Label(tab, text=f"Contenido de la Solapa {i}")
|
||||
label.pack(pady=10)
|
||||
|
@ -109,17 +114,17 @@ for i in range(1, 6):
|
|||
# Usar pack para alinear los labels horizontalmente
|
||||
|
||||
|
||||
label_1 = tk.Label(barra_estado, text="Estado 1", bg="lightgray", anchor="w", width=20)
|
||||
label_2 = tk.Label(barra_estado, text="Estado 2", bg="lightgray", anchor="w", width=20)
|
||||
label_3 = tk.Label(barra_estado, text="Estado 3", bg="lightgray", anchor="w", width=20)
|
||||
label_4 = tk.Label(barra_estado, text="Estado 4", bg="lightgray", anchor="w", width=20)
|
||||
label_fecha_hora = tk.Label(barra_estado, text="Hilo fecha-hora", font=("Helvetica", 16), bd=1, fg="blue", relief="sunken", anchor="w", width=20)
|
||||
label_1 = tk.Label(barra_estado, text="Estado 1", bg="green", anchor="w", width=20)
|
||||
label_2 = tk.Label(barra_estado, text="Estado 2", bg="blue", anchor="w", width=20)
|
||||
label_3 = tk.Label(barra_estado, text="Estado 3", bg="cyan", anchor="w", width=20)
|
||||
label_4 = tk.Label(barra_estado, text="Estado 4", bg="pink", anchor="w", width=20)
|
||||
label_fecha_hora = tk.Label(barra_estado, text="Hilo fecha-hora", font=("Helvetica", 14), bd=1, fg="blue", relief="sunken", anchor="w", width=20, padx=10)
|
||||
|
||||
label_1.pack(side="left", fill="x", expand=True)
|
||||
label_2.pack(side="left", fill="x", expand=True)
|
||||
label_3.pack(side="left", fill="x", expand=True)
|
||||
label_4.pack(side="left", fill="x", expand=True)
|
||||
label_fecha_hora.pack(side="left", fill="x", expand=True)
|
||||
label_fecha_hora.pack(side="right", fill="x", expand=True)
|
||||
# barra_estado.grid(row=1, column=0, columnspan=3, sticky="ew")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue