I have a really weird issue that I have been trying to solve for some time now without any luck.
My program consists of a main frame, a menu bar, underneath the menu bar resides a text control in read only mode, under that a status bar.
within my main class I have a number of functions, one is listed below. On a menu event a function associated with that menu event is called. The function below should print the name of a file that is about to be processed to the textctrl, then the file should be processed, then it moves on to the next file to be printed to textctrl then process that file etc...
Instead the textctrl box & the statusbar completely disappear whilst all the files are being processed. After processing has finished it re-appears with all the text printed to it.
I'm not sure why it disappears. I've moved the code around within the function in many different ways to try & solve the issue but to no avail.
Any help would be much appreciated.
---EDIT--- CODE REMOVED
Sounds like what is happening is that your process is busy doing work and so it doesn't relinquish any cycles to the GUI to refresh.
What you will need to do is move the busy process out to its own thread.
You will want to do something like
and in your main wx.Frame class:
See a much more detailed method and explanation here: http://www.blog.pythonlibrary.org/2010/05/22/wxpython-and-threads/