title: Showing Bitmaps one after another in wxpython at a certain point overlaps them and doesn't show the rest
body: <p>I'm building a simple program in Python to show some images stored in some folders. The program goes from folder to folder showing one image after another like this:</p>
  
  <pre><code>for x in range(len(gl)):
      for y in range(tn[x]):
          png = wx.Image("{}\\{}\\{}".format(username, gl[x], pnglist[tot + y]), wx.BITMAP_TYPE_ANY).ConvertToBitmap()
          delpng.append(wx.StaticBitmap(self.scrollWin, -1, png, (0, 56 * (tot + y)), (56, 56)))
      tot += tn[x]
  </code></pre>
  
  <p>At a certain point, the images stop showing correctly, overlapping, and then don't appear at all.</p>
  
  <p><a href="https://i.stack.imgur.com/gsXws.png" rel="nofollow noreferrer">Correctly showing images</a></p>
  
  <p><a href="https://i.stack.imgur.com/SssrK.png" rel="nofollow noreferrer">Overlapping</a></p>
  
  <p>All the images have 56 pixels of width and height. I've got no idea of what can be causing this.</p>
  
  <p>For the folders it goes through:
  <a href="https://www.mediafire.com/file/l5t2uk9d2d1o7o0/GamerM3243.rar/file" rel="nofollow noreferrer">https://www.mediafire.com/file/l5t2uk9d2d1o7o0/GamerM3243.rar/file</a></p>
  
  <p>And as for the code:</p>
  
  <pre><code>import wx
  
  #username = str(input("Username: "))
  username = "GamerM3243"
  delpng = []
  
  def ShowImages(self, username):
      gl = []
      glif = [0]
      pnglist = []
      rpnglist = []
      tn = []
  
      fl = open("{}\\{}'s Trophies.txt".format(username, username), "r", encoding = "utf-8-sig").read().split('\n')
      self.scrollWin = wx.ScrolledWindow(self, -1, size = (700, 500))
  
      for i, n in enumerate(fl):
          if ''.join(list(n)[:25]) == "Number of trophies earned":
              gl.append(fl[i-1])
              tn.append(int(''.join(list(n)[27:])))
  
      glif = [i for i, n in enumerate(fl) if n in gl]
  
      for i, n in enumerate(gl):
          gl[i] = ''.join([x for x in list(n) if x != ":" and x != "?" and x != '"'])
  
      for i, n in enumerate(glif):
          i1 = n + 2
          try: 
              i2 = glif[i + 1] - 1      
          except IndexError:
              i2 = -1
          rpnglist.append(fl[i1:i2])
  
      for x in rpnglist:
          for y in x:
              if y != "" and y not in gl:
                  pnglist.append(y)
  
      for i, n in enumerate(pnglist):
          for x, z in enumerate(list(n)):
              if z == "-" and n[x - 1] == " " and n[x + 1] == " ":
                  pnglist[i] = ''.join(list(n)[:x - 1])
  
      for i, n in enumerate(pnglist):
          pnglist[i] = "{}.png".format(''.join([x for x in list(n) if x != ":" and x != "?" and x != '"']))
  
      tot = 0
  
      for x in range(len(gl)):
          for y in range(tn[x]):
                  png = wx.Image("{}\\{}\\{}".format(username, gl[x], pnglist[tot + y]), wx.BITMAP_TYPE_ANY).ConvertToBitmap()
                  delpng.append(wx.StaticBitmap(self.scrollWin, -1, png, (0, 56 * (tot + y)), (56, 56)))
          tot += tn[x]
  
      self.scrollWin.SetScrollbars(0, 1, 1400, 56 * tot)
      self.Layout()
      self.Show(True) 
  
  class MainWindow(wx.Frame):
      def __init__(self, parent, title):
          wx.Frame.__init__(self, parent, title = title, size = (700, 500))
          ShowImages(self, username)
  
  app = wx.App(False)
  frame = MainWindow(None, "{}'s Trophies".format(username))
  app.MainLoop()
  </code></pre>
  
  <p>You just need to unzip the file and then place the .py file outside folder.
  Thanks for the help!</p>