Responsive Splash Screen while creating GUI objects

Jasper Alexion <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>

Hello, 


We are currently in the process of creating a splash screen for our 
application and we are encountering a problem that causes the GUI to become 
unresponsive. 


Our application has a very large GUI containing thousands of fields and 
labels. Creating this GUI takes around 10 seconds. In the long term we are 
working towards redesigning our application more towards MVC, but as of now 
it is impossible to dynamically create the GUI when needed. 

 

Goal: 

   1. We want a responsive splash screen while our application is starting. 
   2. Responsive means: draggable window, moving wx.Gauge, etc.. 


   1. 
      1. 
   
 

Problem: 

   1. We can only create GUI objects from the GUI-thread that runs the 
   mainloop 
   2. When the mainloop is busy creating GUI objects, the WHOLE application 
   (at least the GUI part) freezes. 


   1. 
      1. 
   
 

Notes 

   1. We could use wx.Yield() to let the splash screen update itself. 
   However, this would result in a splash screen that sporadically updates 
   at random moments instead of being responsive at all times with a nice 
   smooth flowing wx.Gauge 
   2. We are using threads (wx.Timer,wx.PostEvent,wx.CallAfter) to keep 
   (parts of the) splash screen responsive, this works well during normal 
   operation. However, as soon as the mainloop is too busy to handle wx 
   events the whole GUI freezes. 


   1. 
      1. 
      
How could we achieve this? 

 

We are using Python 3.8.2 and the following libraries: 

numpy==1.18.4 
Pillow==7.1.2 
Pypubsub==4.0.3 
six==1.14.0 
wxPython==4.1.0 

 

Thanks in advance, 

Jasper 

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/bf3743b8-79d1-463d-8b78-d447e206377a%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.