kleines problem, aber ich kriegs einfach nicht hin:
1 Frame mit bild + 1 button
bei druck auf den button soll ein anderes bild angezeigt werden....
Code: Alles auswählen
from Tkinter import *
root = Tk()
img = PhotoImage(file="1.gif")
def next():
global img
global imglab
img = PhotoImage(file="2.gif")
imglab.update()
frame1 = Frame(root)
frame1.pack()
imglab = Label(frame1,image=img)
imglab.pack(side=TOP)
frame2 = Frame(root)
frame2.pack()
but = Button(frame2,text="next",command=next)
but.pack()
root.mainloop()
was mach ich fasch??
danke