Need help with canvas widget in Tkinter please

Gerrit Holl gerrit.holl at pobox.com
Sun Jan 2 17:41:41 EST 2000


flounder wrote on 946779607:
> display = Canvas(mw, width=640, height=480).pack()
> 
> item = display.create_image(0, 0, anchor=NW, image=photo)

That's not a TKinter related problem. You're not creating a class instance,
as you might think. .pakc() doesn't return an instance. Try:
display = Canvas(mw, width=640, height=480)
item = display.create_image(0, 0, anchor=NW, image=photo)
...
display.pack()

regards,
Gerrit.

-- 
"The move was on to 'Free the Lizard'"

  -- Jim Hamerly and Tom Paquin (Open Sources, 1999 O'Reilly and Associates)
 11:27pm  up 12:26, 13 users,  load average: 0.01, 0.05, 0.00




More information about the Python-list mailing list