-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0992f8d
commit f643ee8
Showing
2 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import tkinter as tk | ||
from tkinter import ttk | ||
|
||
# Crear una ventana | ||
ventana = tk.Tk() | ||
ventana.title("Ejemplo de etiqueta con cadena") | ||
|
||
# Variable de tipo cadena | ||
mi_cadena = "¡Hola, mundo!" | ||
|
||
# Crear una etiqueta y mostrar la cadena | ||
etiqueta = ttk.Label(ventana, text=mi_cadena, font=("Arial", 14)) | ||
etiqueta.pack() | ||
|
||
# Ejecutar el bucle principal de la aplicación | ||
ventana.mainloop() |