I want to run some code after the window has loaded. I imagined using EVT_OPEN, as opposite of EVT_CLOSE, to do this, only to find out it doesn’t exist.
I have some code that must run after the window has loaded and that updates a gauge in that window. Therefore I can’t run it in the __init__ of the frame. How do I do this?
I want to run some code after the window has loaded. I imagined using
Share
You can try
EVT_SHOWhttp://www.wxpython.org/docs/api/wx.ShowEvent-class.html
Note that this event occurs for both show and hide – you need to call GetShow to determine which event occurred.
Or you could do something like this:
wx.CallAfter(self.update_gauge)(for example) in your__init__