Skip to content Skip to sidebar Skip to footer

Python Gui To Scroll Through Photos In A Window

I am trying to develop a Python Tkinter widget that opens a window displaying a photo and allows the user to scroll through the photos using a scroll bar. For context, the idea is

Solution 1:

A couple suggestions may get you on the right track. Move the self.root.mainloop() out of the ImageCanvas class and put it at the end, after app = ImgTk(), as simply mainloop(), so it only get's called ones per instance of your app.

Also, ImageCanvas class doesn't have a method called returnedValue, and the result method doesn't return any value. So, add return returnedValue to the result method. Then ImageCanvas.returnedValue() would need to be ImageCanvas.result(), or you could just say self.main.result().

After making these changes, the first image displays, more work will need to be done to get the other images to load.

Post a Comment for "Python Gui To Scroll Through Photos In A Window"