I am working on a project that has a loading screen which is a animated GIF image. The only problem is when I try to display the animated GIF in the Label it only shows the first frame. Why does it do this? And is there a way to display all the frames in the GIF? I know that there has been many other questions like this but none of those questions helped me and I tried their code and it did not work.
Code:
from Tkinter import *
class Application(Frame):
def __init__(self, parent):
Frame.__init__(self,parent)
self.pack(fill=BOTH)
self.create_widgets()
self.animate()
def create_widgets(self):
self.label = Label(self, bd=0)
self.label.pack()
def animate(self):
img = PhotoImage(file="Loading.gif")
self.label.config(image=img)
self.label.image=img
root = Tk()
app = Application(root)
root.mainloop()