I am trying to dynamically change a displayed picture to another picture on a GUI.
I have tried various suggested ways seen on websites and none have worked this far.
What am I doing wrong?
Thanks...
I have tried various suggested ways seen on websites and none have worked this far.
What am I doing wrong?
from tkinter import * from tkinter import ttk def TestLogic(): stgImg = PhotoImage(file="Stage1.gif") label=ttk.Label(root, image=stgImg) label.image = stgImg return 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()The first image is displayed just fine. When I press the button, nothing happens.
Thanks...