I beg to differ :-). This may not be what notebooks were designed for at
all.
I believe I know what is desired since we do the same thing in our
Tokenizer Manager for our text/data mining platform. We also use
notebooks, of course, but in other circumstances -- where the user needs
direct and quick access to several different pages of information.
But there are cases where you don't want a notebook and what you want
instead is a panel (or "page" or "subwindow" -- take your pick) where
different and appropriate information is displayed depending upon the
current task at hand or selections made in the current main window. In our
case it is an "edit panel" whose contents change depending on whether the
user is "working within" the tokenizer definition area, the token
definition area, or the pattern definition area. Using a notebook would be
cumbersome, inappropriate, and confusing.
What you want is to "switch" the contents of the edit panel. Looking at
the code (which I didn't write in this case), I see that this is
accomplished with calls to the Show() and Layout() methods. I suspect that
all that is missing in the problematic case here is a call to Layout()
after the call to Show(). We don't destroy the panel(s) not currently
being shown, but you could do that, depending on your needs.
···
--------------------------------------
Gary H. Merrill
Director and Principal Scientist, New Applications
Data Exploration Sciences
GlaxoSmithKline Inc.
(919) 483-8456
"Jeff Grimmett"
<grimmtooth@softhome.ne
>
To: wxPython-users@lists.wxwindows.org
01-Dec-2003 01:52 cc:
Please respond to Subject: RE: [wxPython-users] Dynamic panel
wxPython-users@lists.wx
windows.org
In my application I have a panel on the right side showing the
status of the
program. This panel needs to display different information in different
layouts (using different controls). How can this be done?I've tried to make a panel class for each of the layouts, but I'm having
problems showing it correctly. If I use sizers I can't get the panels to
switch place (Tried using Show(True/False)). I've also tried to
remove/add
the panels to the sizer, but this doesn't work.
Any ideas how to solve this? (Hopefully in a structured way)
This is exactly what wxNotebook is designed for; also see how the demo is
set up (Main.py) for another way to do this. Also, wxPy 2.5 will have a new
control that will do something similar (wxListbook).
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org