[Tutor] how to use the "image" option for Button widget in Tkinter

Bernard Lebel 3dbernard at gmail.com
Mon May 29 16:59:59 CEST 2006


Hello everyone,

I'm looking for a way to put an image on a button in a Tkinter GUI,
but for the life of me I just can't find any clear directions about
how to do that. No matter where I look, the only documentation I can
find is this (Fred Lundz):

"image (image). The image to display in the widget. If specified, this
takes precedence over the text and bitmap options."


How do you format the image argument value? I have try absolute paths,
I always get a path not found error. Also, what is the file format to
use?


Thanks
Bernard


More information about the Tutor mailing list