title: After() not reaching next iteration in splash window
body: <p>I have a splash window in a tkinter application, which is a child class of <code>Toplevel</code>. My target is to show a GIF moving, thus I am trying with a recurrent <code>.after()</code> function to update a <code>Label</code>. My code for the Splash window is:</p>
  <pre><code>import tkinter as tk
  
  class Splash(tk.Toplevel):
  
      def __init__(self, parent):
      
          tk.Toplevel.__init__(self, parent)
      
          self.overrideredirect(True)
      
          self.parent = parent
              
          frames = [tk.PhotoImage(file=&quot;myfile.gif&quot;,format = 'gif -index %i' %(i)) for i in range(89)] #it has 89 frames
  
          def animate(ind, label):
          
              frame = frames[ind]
                                  
              ind += 1
          
              if ind&gt;88: #With this condition it will play gif infinitely
              
                  ind = 0
                              
              label.configure(image=frame)
                      
              label.update()
                                              
              self.after(110, animate, ind, label)
  
          label = tk.ttk.Label(self)
      
          label.pack(expand=1)
      
          self.after(0, animate, 0, label)
      
          self.parent.overrideredirect(True)
      
          self.update()
      
          self.lift()
  </code></pre>
  <p>Now: I tried to also put a <code>print</code> function before the next <code>after</code> call, and  I could see that it reached that step. However, if I place a <code>print(str(ind))</code> at the beginning of the <code>animate</code> function, I see only the first index appearing.</p>
  <p>How can I actually loop in a <code>Toplevel</code> window in the correct way?</p>
  <p><strong>EDIT:</strong></p>
  <p>To add context to this, I have the main class <code>App</code> where I do the following:</p>
  <pre><code>from ttkthemes import ThemedStyle, ThemedTk
  import GUI.splash as sp
  
  class App:
  
      def __init__(self, ...):
  
          self.interface = ThemedTk()
  
          self.interface.iconify()
  
          splash = sp.Splash(self.interface)
  
          ...
  
          self.interface.after(3000, splash.destroy) #Thanks @CoolCloud
  
          self.interface.deiconify()
  
          self.interface.mainloop()
  
  </code></pre>
  <p><strong>EDIT 2:</strong></p>
  <p>I have tried with a minimum reproducible example:</p>
  <pre><code>    import tkinter as tk
  
      class Splash(tk.Toplevel):
  
          def __init__(self, parent):
      
              tk.Toplevel.__init__(self, parent)
      
              self.overrideredirect(True)
      
              self.parent = parent
              
              frames = [tk.PhotoImage(file=&quot;C:/temp/splash.gif&quot;,format = 'gif -index %i' %(i)) for i in range(89)] #it has 89 frames
  
              def animate(ind, label):
          
                  frame = frames[ind]
                                  
                  ind += 1
          
                  if ind&gt;88: #With this condition it will play gif infinitely
              
                      ind = 0
                              
                  label.configure(image=frame)
                      
                  label.update()
                                              
                  self.after(110, animate, ind, label)
  
              label = tk.Label(self)
      
              label.pack(expand=1)
      
              self.after(0, animate, 0, label)
          
              self.update()
      
              self.lift()
  
      class App:
  
          def __init__(self):
  
              self.interface = tk.Tk()
  
              self.interface.iconify()
  
              splash = Splash(self.interface)
  
              self.interface.after(3000, splash.destroy)
  
              self.interface.deiconify()
  
              self.interface.mainloop()
          
      if __name__ == &quot;__main__&quot;:
      
          App()
  </code></pre>
  <p>It looks like the actual problem is the <strong>size</strong> of my underlying window, or at least that's what I would think, since in my case I load multiple frames (one on top of the other one) and switch between them depending on an OptionMenu. Maybe this is too much, however it works much better than destroying and rebuilding everything.</p>
  <p>Btw, <strong>keeping my app heavy as it is</strong>, is there a better way to produce a splash screen to load my interface <strong>and</strong> show a gif moving as in my minimal example? The gif can be downloaded here: <a href="https://images.app.goo.gl/Bpi6EvpJgodiQs2e7" rel="nofollow noreferrer">https://images.app.goo.gl/Bpi6EvpJgodiQs2e7</a></p>