Hi All,
Image display drives me crazy. After I get it displayed, and want to do the job
with a class, display failed again. Please take a look at my trial code:
from Tkinter import *
class imageDisplay:
def __init__(self, parent=None):
canvas = Canvas(width=400, height=300, bg='beige')
canvas.pack()
self.canvas = canvas
img = PhotoImage(file="xxx.gif")
self.canvas.create_image(150, 0, image=img, anchor=NW)
if __name__ == '__main__':
imageDisplay()
mainloop()
Result: A blank canvas was displayed. No error message.
Can somebody help? Thanks so much!
--
https://mail.python.org/mailman/listinfo/python-list