hey guys im trying to work this out for a school assignment, i cant get the destroy function to work whith the button i created, heres mycode see if you can look at it and tell me whas wrong
import Tkinter as tk
root = tk.Tk()
root.title('background image')
def qwerty():
self.destroy(button2)
#def qwerty():
image1 = tk.PhotoImage(file="Black.gif")
w = image1.width()
h = image1.height()
panel1.image = image1
root.geometry("%dx%d+0+0" % (w, h))
panel1 = tk.Label(root, image=image1)
panel1.pack(side='top', fill='both', expand='yes')
self.button2 = tk.Button(panel1, text='Click here to continue', command = qwerty)
self.button2.pack(side='bottom')
root.mainloop()