def newPic(): Data.pic += 1 def Dsp_Image(): ...... imgPrep = ImageTk.PhotoImage(img) imgShow = Label(app, image=imgPrep).grid() ... next = Button(app, text="Next Image", command=newPic).grid() app.mainloop()
Dsp_Image() > The image won't refresh when I click on 'Next'! > Any help would be appreciated. You never ask it to refresh. The GUI displays the image that you pass to it, you then call newPic which only increments the data counter but does nothing to change the image being displayed. You need to make your Photoimage object visible to newPic (by making it global say?) and then in newPic acyually update the image being displayed. visible BTW you seem to be callingmainloop within the DSpImage function, thats probably a bad idea, mainloop should only be called once which means you could never call DspImage a second time should you ever need to... HTH, Alan G Author of the learn to program web tutor http://www.freenetpages.co.uk/hp/alan.gauld _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor