I am playing with Tkinter. While I am less than comfortable with it so
far, it is semi-OK and I have created some of stuff that seems to work
OK. But, I have one thing that makes no sense. I have created a
minimalist case which appears below. I have tried it with both a GIF
and a PPM and with pack() and grid(). I get the same result--always a
gray box instead of the red or green one which is what the image files
are.

Any pointers/clues would be appreciated (including "there is a bug
with Tk 8.4 with Python 2.6 or whatever).

Gracias.

#!/usr/bin/python
# -*- coding: utf-8 -*-

from Tkinter import *
import time

class Application(Frame):

    def __init__(self, master=None):
        Frame.__init__(self, master)
        self.pack()

        # Playing to figure out why placement doesn't work
        puke = Frame(master, height=35, width=380,
            relief="groove", borderwidth=1, bg="#DEF")
        puke.pack()
        img_red = PhotoImage(file="Img/red.ppm")
        img_green = PhotoImage(file="Img/green.gif")
        pukea = Label(puke, image=img_green)
        pukea.pack()

app = Application()
app.mainloop()

-- 
Phil Hughes
[email protected] -- [email protected]

Reply via email to