import tkinter as tkdef msgShow():label.config(text="hehehe", bg="lightyellow", fg="blue")root = tk.Tk()root.title('图片按钮')imgBtn = tk.PhotoImage(file=r"C:\pic\pdf.png")tk.Button(root, image=imgBtn, command=msgShow).pack()label = tk.Label(root)label.pack()tk.mainloop()








