Tkinter-create_image-Problem

A.A andtherewaswater at yahoo.com
Thu Jan 10 00:07:45 EST 2002


Thanks for the reply, Eric.

The code is:

from Tkinter import *

class App(Frame):
	def __init__(self, master=None):
		Frame.__init__(self, master)
		Pack.config(self)
		self.createW()
		self.img = PhotoImage('image.gif')
		self.C.create_image(20, 20, image=self.img)

	def createW(self):
		self.C = Canvas(width=200, height=200)
		self.C.pack(TOP)
    
app = App()
app.mainloop()



Eric Brunel wrote:
> 
> Can you please include your code? If your Python was compiled with Tkinter
> support, there's no reason why it shouldn't work (PIL has nothing to do with
> that...).
> Thanks.
>  - eb -
> 
> "A.A" <andtherewaswater at yahoo.com> a écrit dans le message news:
> 3C3BDC4B.F9F68A20 at yahoo.com...
> > Hello,
> >
> > I tried to place a gif image on a WHITE canvas, using the PhotoImage
> > class, but the image doesn't appear on the Canvas. No errors are raised
> > ?
> >
> > I built+installed Python2.2 from a src rpm, so could it be that tkinter
> > was compiled without PythonImagingLibrary (PIL) Support ? How do I
> > verify this ?
> >
> >
> > Thanks,
> >
> > Regards,
> >
> > A.A.



More information about the Python-list mailing list