Hi all,
I’m developing a medium sized wxPython application, and recently I ran into a problem I don’t know how to solve. I distilled the essential part, and I’m attaching an archive of code demonstrating the problem. Roughly, I do this:
-
Start the application
-
Open the main window of the application, set it as a Top window. I specify a None parent when creating the window.
-
This window has a menu that allows me to open a dialog. I specify the main window as a parent of the dialog.
-
This dialog has a button that a) closes the dialog, b) opens another frame. I specify the main window to be the parent of the frame.
-
I end up with the main window obscuring the frame from step 4). However, I’d expect the frame to be above the main window - why should be a newly opened frame below any other window?
However, on Linux (GTK), everything works as I’d expect, after 5) main window is below the frame. On windows XP, though, the main window is above.
This was tested with wxPython2.8-unicode-py27 (2.8.12.1). I load the frames from XRC.
I have attached sources demonstrating the problem. Some small parts of the code are not necessary, but since it is just a distilled fraction of a bigger project with my own framework, I wanted to mimic the behaviour of my application as accurately as possible.
Is there anything I have done wrong? How can I remedy/work around this situation?
Thank you very much,
Kind regards,
Tomas Dvorak
main.py (2.44 KB)
resources.xrc (2.32 KB)