[Tutor] Images + Tkinter
Hans Gubitz
gubitz@netcologne.de
Fri Nov 15 16:23:01 2002
Hello,
tk.mainloop() seems to be not in the right place. But the gif will not
be shown, when I eliminate this line.
Any hints?
import Tkinter
from Tkconstants import *
def window(tk):
frame=Tkinter.Frame(tk)
frame.pack()
canvas=Tkinter.Canvas(frame,width=400,height=500)
photo=Tkinter.PhotoImage(file="picture.gif")
canvas.create_image(200, 250, image=photo)
canvas.pack()
button=Tkinter.Button(frame, text="EXIT", command=tk.destroy)
button.pack()
tk.mainloop() # ?????????????????????????
root = Tkinter.Tk()
window(root)
root.mainloop()
Hans Gubitz <gubitz@netcologne.de>