Load image to PhotoImage : PhotoImage : Tkinker PYTHON TUTORIALS


PYTHON TUTORIALS » Tkinker » PhotoImage »

 

Load image to PhotoImage


from Tkinter import *
root = Tk()
frame = Frame(root)
myimage = PhotoImage(file="new.gif")
b = Button(root)
b.config(image= myimage)   # or  b.image = myimage 
frame.pack()
b.pack()
root.mainloop()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Tkinker
» PhotoImage