[Tutor] <<NEWBIE>> Soooooo CLOSE!!! :-)
Mon, 26 Feb 2001 13:48:28 -0800 (PST)
As per my message earlier today, I am trying to get
an image to display in a Tk window. Here is my source
from Tkinter import *
def __init__(self, master):
frame = Frame(master)
self.canvas = Canvas(frame, bg="red",width=601,
photo = PhotoImage(file="bg1.gif")
self.item = self.canvas.create_image(10, 10,
root = Tk()
app = App(root)
I don't get any error messages - what I do get is a
big window with the red background. My guess is that
after I create the image, I have to do something to
make it visible? I tried adding a line like this:
but it gives me the error:
AttributeError: 'int' object has no attribute 'pack'
I guess that means that item is just the ID of the
image rather than the image itself?
*sigh* I'm so close I can taste it. If anyone can
help me, I'd be much obliged.
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.