0

I am trying to create an image button on tkinter as part of a longer program but when I run this code the button just turns into an outlined box without showing the content of the image.

def MainMenu(self):
        photo=PhotoImage(file= r"[file path]")
        photoimage=photo.subsample(3,3) #resizing image to fit on button
        NumberButton = Button(self.root, image=photoimage, command=CreateNumberMenu)
acw1668
  • 40,144
  • 5
  • 22
  • 34

0 Answers0