Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- root = Tk()
- def on_click(event):
- t = event.widget
- t['image'] = ''
- fox = PhotoImage(file = 'test.gif')
- button = Button(image = fox)
- button.pack()
- button.bind('<Button-1>', on_click)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment