Jun-04-2020, 09:02 AM
(May-28-2020, 08:50 PM)selmansem Wrote: Try this...
from tkinter import * from tkinter import ttk def TestLogic(): stgImg = PhotoImage(file="Stage1.gif") label.configure(image=stgImg) label.image = stgImg root = Tk() root.geometry('1010x740+200+200') stgImg = PhotoImage(file="Stage0.gif") label=ttk.Label(root, image=stgImg) label.place(x=400, y=400) testBtn=ttk.Button(root, text="TEST", command=TestLogic) testBtn.place(x=400, y=200) root.mainloop()
It is working.
But what is the logic behind
"label.image = stgImg " this command.
Only this command makes it work. It is completely new addition when compared with text update.