我正在尝试为我的代码的一部分导入图像,但未显示,但是在另一部分中显示的是图像

时间:2019-06-27 22:35:11

标签: python tkinter photoimage

代码未显示图片

home = PhotoImage(file = 'homebutton.png')
Button(hotfood, image = home, bg = 'white', command = 
hotfood.destroy).grid(row = 0, column = 0, sticky = EW)
return home

显示图片的代码

logo = PhotoImage(file = 'logo.PNG')
Label (order, image = logo, bg = 'white').grid(row = 0, column = 0, 
sticky = E)

0 个答案:

没有答案