Guest User

Untitled

a guest
Feb 13th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. from tkinter import *
  2. from tkinter import messagebox
  3. def add(a, b):
  4. messagebox.showinfo("Resultado", a.get()+b.get())
  5. win=Tk()
  6. win.geometry('300x200')
  7. a=StringVar()
  8. b=StringVar()
  9. in1=Entry(win, textvariable=a)
  10. in2=Entry(win, textvariable=b)
  11. btn=Button(win, text="Somar", activebackground='green', command=add(a,b))
  12. in1.pack()
  13. in2.pack()
  14. btn.pack()
  15. win.mainloop()
Add Comment
Please, Sign In to add comment