When I use this code to execute an image inside a button within a frame it works just fine:
image2= PhotoImage(file="questionmark.gif")
f3buttonQ=Button(f3,image=image2, command = findcustomer).place(x=425,y=10)
However, when I just want to use this in the root frame I use this code:
image2= PhotoImage(file="questionmark.gif")
f3buttonQ=Button(root, image=image2,command = findcustomer).place(x=450,y=110)
The image doesn't load in the latter piece of code and the only difference between the two would be the f3 in the first one. Thanks.
Update:
So I managed to get the command to work by using this:
photo2= tk.PhotoImage(file="questionmark.gif")
button = Button(image=photo2,command = findcustomer).place(x=450,y=110)
When I run this alone the image is loaded just perfectly onto the button, but when I add this line under it they both go blank again and the image isn't loaded:
f3findProduct=Button(image=photo2, command = findproduct).place(x=110,y=190)