[Pythonmac-SIG] Canvas PhotoImage

mark brady brady@mmm.com
Fri, 02 Feb 2001 16:22:27 -0800


I find some strange things happening with PhotoImages.  The line
of code below should display a PhotoImage item on a canvas but it
doesn't.

   imageItem = myFrame.draw.create_image( sizex, sizey, image=tkIm )

where myFrame is a frame, draw is a canvas, and tkIm is a PhotoImage.
A similar line works elsewhere when the frame is created.  Just to be sure
everything else was OK with my context I tried creating an oval item on
the canvas at the same point in my program that the above line appears,
using the same frame, canvas, etc.  That appeared just fine.  So there
seems to be some difference in behavior between ovals and PhotoImages.

Has anyone else tried this?

-Mark