Tkinter buttons with image ?

Axel Kowald kowald at
Mon Aug 16 17:59:56 CEST 2004

> Using the image in Tkinter will not keep it from being garbage-collected.
> You need to keep a reference to the image, either in a global variable or
> like so:
> buttonStart = Button(frameWb, image=tmp, command=root.quit)
> buttonStart.image = tmp

Ah, that's the trick.

Many thanks,


More information about the Python-list mailing list