Advertisement
AntonioVillanueva

python test tkinter

May 7th, 2019
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8
  3. from tkinter import *
  4. ventana =Frame (height=500,width=400)
  5. ventana.pack(padx=20,pady=20)
  6.  
  7. etiqueta =Label(text="Nombre : ",font=("Verdana",15)).place(x=0,y=10)
  8. etiqueta2 =Label(text="Apellido : ",font=("Verdana",15)).place(x=0,y=40)
  9.  
  10. entrada=StringVar()
  11. entrada.set("Tony")
  12. campo =Entry(ventana,textvariable=entrada,font=("Verdana",15)).place(x=90,y=10)
  13.  
  14. entrada2=StringVar()
  15. entrada2.set("Villanueva")
  16. campo =Entry(ventana,textvariable=entrada2,font=("Verdana",15),background="yellow").place(x=90,y=40)
  17.  
  18. boton=Button (ventana,text="Aceptar",font=("Verdana",15),background="green").place(x=0,y=100)
  19. boton=Button (ventana,text="Cancelar",font=("Verdana",15),background="red").place(x=0,y=15)
  20.  
  21. ventana.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement