Newbie Tkinter Question

Pseud O'Nym notexpletivedeleteduk at notyahoo.co.uk
Wed Apr 13 17:43:32 EDT 2005


Hi,

the following fragment doesn't cause any errors and results in buttons the
correct size for the images, but the buttons don't work, and the images
aren't displayed. If I add a text property, and remove the images, they work
fine, so the rest of my code's OK. I've searched this group and Python.org
to no avail.

class App:
  def __init__(self, master):
    frame = Frame(master)
    frame.pack(side=LEFT, fill=Y)
    image1 = PhotoImage(file='button_a.gif')
    self.button = Button(frame, image=image1)
    self.button.pack(side=TOP)

Can anyone enlighten me?





More information about the Python-list mailing list