responsive-con-solapas
This commit is contained in:
parent
4fe94344e5
commit
3cc5c43dc4
|
@ -1,5 +1,7 @@
|
|||
import tkinter as tk
|
||||
from tkinter import Menu
|
||||
from tkinter import Menu # Importar el widget Menu
|
||||
from tkinter import ttk # Importar el widget ttk
|
||||
|
||||
|
||||
# Crear la ventana principal
|
||||
root = tk.Tk()
|
||||
|
@ -69,5 +71,17 @@ frame_inferior.grid_propagate(False)
|
|||
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)
|
||||
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}")
|
||||
# Añadir un Label en cada solapa para diferenciarla
|
||||
label = ttk.Label(tab, text=f"Contenido de la Solapa {i}")
|
||||
label.pack(pady=10)
|
||||
|
||||
# Ejecución de la aplicación
|
||||
root.mainloop()
|
||||
|
|
Loading…
Reference in New Issue