Advertisement
Guest User

Untitled

a guest
Nov 20th, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. from Tkinter import *
  2.  
  3. root = Tk()
  4. root.geometry("500x500")
  5.  
  6. class Application(Frame):
  7.  
  8. def __init__(self, master):
  9. #initialize the frame
  10. Frame.__init__(self, master)
  11. self.grid()
  12. self.createWidgets()
  13.  
  14. def createWidgets(self):
  15. self.can = Canvas(root, width=160, height=160, bg='white')
  16. self.pic = PhotoImage(file='speaker.gif')
  17. self.item = can.create_image(80, 80, image=pic)
  18.  
  19. app = Application(root)
  20.  
  21. #kick off event loop
  22. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement