Hi, On Wed, 29 Oct 2014 13:08:04 +0530 rajat das <rajatdas2...@gmail.com> wrote:
> Dear All, > > I am new in python programming, kindly help me out. > > *Problem: *Basically as user press the "Next image button" the image > should get refreshed by the next image from the specified path and so > on. The problem is on pressing the button the image is coming below of > the previous image not on top of it. Basically I want the images should > slide on pressing the next button. (...) > def Click(): > > image = Image.open("C:/Users/Slide2.bmp") > photo = ImageTk.PhotoImage(image) > > label = Label(root,image=photo) > label.image = photo # keep a reference! > label.pack() the problem with your code is that instead of changing the image data of the existing label widget you create a new Label. In your Click() function you should simply do label.configure(image=photo) instead of creating a new label. I hope this helps Michael .-.. .. ...- . .-.. --- -. --. .- -. -.. .--. .-. --- ... .--. . .-. Humans do claim a great deal for that particular emotion (love). -- Spock, "The Lights of Zetar", stardate 5725.6 _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss