wxPython : getting started

Tony Nelson *firstname*nlsnews at georgea*lastname*.com
Tue Nov 29 21:52:43 CET 2005


In article <438c8dc4$1 at epflnews.epfl.ch>,
 David Sulc <davidsulc at oleyres.ch> wrote:

> Hi !
> 
> I've looked all over (internet, books, etc.) and I haven't found a very 
> good ressource to get started with wxPython (yes, I've been through 
> their tutorial).
> 
> What I would basically like to do for starters is to be able to define 
> the main panel being displayed. For example :
> 1. wxFrame contains a wxPanel  (call it mainPanel).
> 2. mainPanel contains another panel (childPanelA)
> 3. another panel has been defined (childPanelB) but is not displayed 
> (the user can only see childPanelA inside mainPanel)
> 4. by clicking on a menu entry (for example), the displayed panel is now 
> childPanelA (which is inside mainPanel)
> 
> So how do I do this ? I realize it's a very basic question, but it's 
> been driving me mad...
 ...

I don't know or use wxWidgets, and I've just learned GTK, but I think 
one good answer is the same as with GTK:  use a wxNotebook.  You may be 
able to hide the tabs, or you may just decide they're a good thing to 
have.

To do what you asked, see the wxWindow method Show(), which you would 
call for each or A and B etc. in response to the command.
________________________________________________________________________
TonyN.:'                        *firstname*nlsnews at georgea*lastname*.com
      '                                  <http://www.georgeanelson.com/>



More information about the Python-list mailing list