After some further googling around, I found the solution. In fact, I found it in an example on a german web page, http://home.foni.net/~heikos/tkinter/node56.html (I don't speak German).
Anyway, here is my working code, for the record: import Tkinter as tk import os # Define constants sIMAGEROOT = r'\\Linuxserver\ANIMATION\XSI\WORKGROUP_ANIMATION\Data\Scripts\bb_pipeline\bb_filesystem\bb_filesystemimages' sOPENFOLDER = os.path.join( sIMAGEROOT, 'openfold.gif' ) # Build main frame oMainFrame = tk.Tk() # Create image instance oOPENFOLDER = tk.PhotoImage( file = sOPENFOLDER, master = oMainFrame ) # Create button oButton = tk.Button( oMainFrame, image = oOPENFOLDER ) oButton.photo = oOPENFOLDER oButton.pack( side = tk.LEFT ) # Launch GUI oMainFrame.mainloop() Cheers Bernard On 5/29/06, Bernard Lebel <[EMAIL PROTECTED]> wrote: > 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 > _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor