title: Database Loading Panel Screen StaticText is Blurred Out when Shown
body: <p>Database Loading Panel Screen StaticText is Blurred Out when Shown</p>
  
  <p>Hello,</p>
  
  <p>I have an odd issue with a loading screen. The problem is this: When I start with a main screen, then when you click on the 'next' button,
  it goes to the database loading screen, when it is done, it prints on the screen that the Database Loading is complete.</p>
  
  <p>The problem is that the loading screen text is blurred out for some reason. Also, something I discovered is that if you pop up a message dialog
  box, the loading text is shown...</p>
  
  <p>In this example, I am not actually loading into an actual database. Instead, I am just sleeping for seven seconds.</p>
  
  <p>If you are confused as to what I am saying, just run the example, and you will see that the loading screen is all messed up...</p>
  
  <p>Here is the code:</p>
  
  <pre><code>import wx
  import time
  
  class TextPanel(wx.Panel):
  
      def __init__(self, parent, label):
  
          self.__myParent = parent    
          wx.Panel.__init__(self, self.__myParent, size = (800, 800))        
          staticText = wx.StaticText(self, label = label)
  
  class MainPanel(wx.Panel):
  
      def __init__(self, parent):
  
          self.__myParent = parent    
          wx.Panel.__init__(self, self.__myParent, size = (800, 800))
          nextButton = wx.Button(self, label = 'Next')
          nextButton.Bind(wx.EVT_BUTTON, self.__onNext)
  
      def __onNext(self, event):
  
          self.__myParent.onNextScreen()
  
  class MainFrame(wx.Frame):  
  
      def __init__(self):
  
          # Base contsructor.
          wx.Frame.__init__(self, None, id = -1, title = 'Testing...', size = (800, 800))
  
          self.__myMainPanel = MainPanel(self)
          self.__myMainPanel.Show()
  
          self.__myDatabase = TextPanel(self, 'Loading Data...')
          self.__myDatabase.Hide()
  
          self.__myFinalPanel = TextPanel(self, 'Database Loading Complete!')
          self.__myFinalPanel.Hide()
  
      def onNextScreen(self):
  
          self.__myMainPanel.Hide()
          self.__myDatabase.Show()
  
          self.doDatabaseLoad()
  
          self.__myDatabase.Hide()
          self.__myFinalPanel.Show()
  
      def doDatabaseLoad(self):    
  
          time.sleep(7) # before, this method would load data into a database...
  
  if __name__ == '__main__':
      app = wx.App()
      frame = MainFrame()
      frame.Show(True)
      app.MainLoop()
  
      print 'Exiting...'
  </code></pre>