Tkinter Button image option

Jason Harper JasonHarper at pobox.com
Sun Apr 11 13:04:17 EDT 2004


Are you saving a reference to the image you loaded somewhere (perhaps as
an attribute of the button, if that's the only user of the image)? 
Merely using an image in a Tkinter widget is NOT sufficient to keep it
from being garbage collected.

PIL is not required for basic use of images in Tkinter, although it does
give you lots more options for working with them.
	Jason Harper



More information about the Python-list mailing list