Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #hey guys
- #i am learning GUI using Tkinter in python... i am having a simple problem maybe its from my IDE...'''
- from tkinter import *
- def result():
- print ("The sum of 2+2 is", 2+2)
- win = Frame()
- win.pack()
- Label(win, text='Click Add to get the sum or Quit to Exit').pack(side=TOP)
- Button(win, text='Add', command=result).pack(side=LEFT)
- Button(win, text='Quit', command=win.quit).pack(side=RIGHT)
- win.mainloop()
- #When i run that code the add button works fine but the quit button does not exist out of the window. what am i doing wrong?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement