Guest User

Untitled

a guest
Jun 25th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import tkinter as tk
  2. root = tk.Tk()
  3. texto = tk.StringVar(master=root)
  4. texto.set("Un nuevo texto")
  5.  
  6. tk.Label(root, text="¡Hola mundo!").pack(anchor="nw")
  7. label = tk.Label(root, text="¡Otra etiqueta!")
  8. label.pack(anchor="center")
  9. tk.Label(root, text="¡Última etiqueta!").pack(anchor="se")
  10. label.config(bg="green", fg="blue", font=("Verdana",24))
  11. label.config(textvariable=texto)
  12.  
  13. imagen = tk.PhotoImage(master=root, file="lena.png")
  14.  
  15. tk.Label(root, image=imagen, bd=0).pack(side="left")
  16.  
  17. root.mainloop()
Add Comment
Please, Sign In to add comment