It is important to remember that "Wx" is actually a C++ widget set that we use Python bindings to access. This means that the Wx documentation can be of great use to understand both details and high level concepts.
Note that it is more or less impossible to use Wx directly from C, you will need to work from C++ (something I am unwilling to do).A "window" per se, never shows up in the API. It is a root class for almost everything else, but you shouldn't care about that. So forget about windows -- or at least forget about looking for them in the API.
The main window of a typical application is a "Frame" object. This is something a system window manager will manage. Perhaps an application could have several frames, but this would be unusual.
The business of Panels seems to be a major area of confusion (i.e. poor documentation).
A Panel is intended as a container to hold widgets. A Frame will typically hold
one or more panels. You should not place widgets directly into a frame (why?)
but should put them into a panel. And if you segment a GUI into several panels,
you should set up one big container panel to hold the smaller panels.
Why? Nobody knows. But this is what you should do.
Use lots of panels, panels within panels, hierarchies of panels.
Dialogs are generally "modal". This means that they appear and grab focus until dismissed.
Windows managed by the sizer associated with the given window must have this window as parent, otherwise they will not be repositioned correctly. Please use the window wxFrame@0x558bdc048470 ("One mount") with which this sizer is associated, as the parent when creating the window wxControlSince I fall into this hole each and every time, I figure it is worth documenting what I am doing wrong so I can refer back here the next time I find myself in this hole.
In the above case I have a panel within a frame. The fix was to change the first line below to the second.
self.SetSizer ( s ) pan.SetSizer ( s )The first line was setting the sizer to the frame, but I wanted it set to the panel within that frame.
Tom's Mineralogy Info / tom@mmto.org