Hi, I have a picky question about using an empty ImageTk.PhotoImage. I am 
trying to create a placeholder space for an image that will be supplied later - 
something like this:

    root = Tk()
    pimage = ImageTk.PhotoImage('RGB', (300,300))
    image_holder = Label(root, image=pimage)
    image_holder.grid()

However, the result is a a tiny window, not one with a 300x300 empty space. If 
I do pimage.paste(...) later with a real image, it grows as expected to fit the 
image.

I could set the width and height of the Label to 300x300 when I create it, but 
shouldn't the empty PhotoImage act like a 300x300 image?

Thanks,
Dan
 

_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to