-1

I am trying to add a "page under construction" png file to only 1 of the 3 pages under my release menu which has "release 1", "release 2", and "release 3".

{def underConstruction():
    my_img = ImageTk.PhotoImage(Image.open('c/path/to/my/png/file')
    my_label = Label(image=my_img)
    my_label.pac()
    print "I am adding the png file here."}

my calling statement is: {subMenu.add_command(Label="Release 1...", command = underConstruction.} the problem is only the print statement gets executed. It did not pull in the png file. What went wrong?

PChao
  • 417
  • 2
  • 5
  • 17

1 Answers1

0

my_img = ImageTk.PhotoImage(Image.open('c/path/to/my/png/file') is missing a paren at the end.

my_label.pac() should be my_label.pack()

Your calling statement should have a lowercase label = instead of Label = .

If this code isn't throwing any errors, you might want to figure out what your error handling is doing to prevent it from doing that.

Brock Brown
  • 956
  • 5
  • 11