Images on buttons in loops in tkinter [closed]

This was the problem found by acw1668:

Everytime Item.tkImage() is called, a new instance of ImageTk.PhotoImage() is created and returned. So but.config(image=newitem.tkImage(),...) and but.image = newitem.tkImage() refer to different instances of ImageTk.PhotoImage().

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top