You've already forked Curso-lenguaje-python
Add library exercises
This commit is contained in:
19
python-ofensivo/08_librerias/08_tkinter_02_grid.py
Normal file
19
python-ofensivo/08_librerias/08_tkinter_02_grid.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Librería tkinter - grid
|
||||
|
||||
"""
|
||||
|
||||
import tkinter as tk
|
||||
|
||||
root = tk.Tk()
|
||||
root.title("Mi primera aplicación gráfica")
|
||||
|
||||
label1 = tk.Label(root, text="Hola mundo!", bg="red", fg="white")
|
||||
label2 = tk.Label(root, text="Segundo Hola mundo!", bg="blue", fg="white")
|
||||
label3 = tk.Label(root, text="Ola k ase", bg="green", fg="white")
|
||||
label1.grid(row=0, column=0)
|
||||
label2.grid(row=0, column=1)
|
||||
label3.grid(row=1, column=0, columnspan=2)
|
||||
|
||||
root.mainloop()
|
||||
Reference in New Issue
Block a user