this code is just an example code:
import tkinter as tk
root = tk.Tk()
photoImageObj = tk.PhotoImage(file="signout.png")
lab = tk.Label(root, image=photoImageObj).pack()
photoImageObjj = tk.PhotoImage(file="signout.png")
signout_button=tk.Button(root,image=photoImageObjj).pack()
root.mainloop()
In this code it is working and output is also working fine.
here is the output:
but in my real project, where I am using this button with the image is not working.
code:
photoImageObj = PhotoImage(file="signout.png")
signout_button=Button(stem,image=photoImageObj).pack()
here I haven't pasted my whole code since it is having 50-60 line's of code.
Output:
so if the same code is working fine, then there is problem in my real project file. so can anyone help me debug that.