daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Feb 13th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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()
RAW Paste Data
Top