Dynamic panel

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

And I agree with the differing....

I"ve enclosed a small app I wrote that does jsut what you want. IN this
case, I actully would have liked to use a notebook, but only GTK does a
decent job of putting the notebook tabas on teh side, so I emulated that
with buttons et. Take a look, and you should be abel to adapt the code
for your purposes...

-Chris

Converter.py (10.7 KB)

···

gary.h.merrill@gsk.com wrote:

I beg to differ :-). This may not be what notebooks were designed for at
all.

--
Christopher Barker, Ph.D.
Oceanographer
                                        
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

I"ve enclosed a small app I wrote that does jsut what you want. IN this

Crucially, you left out 'furlongs per fortnight'! Even Google calculator
has it :slight_smile:

http://www.jardine-engineering.com/written/furlong1.html

On the serious side, US gallons and UK gallons are actually different
sizes as well. I don't know if pints are the same size. This all
turns out to be important when converting what people pay for fuel
in the rest of world (usually in currency per litre or per UK gallon)
into USD per US gallon.

Roger

> I beg to differ :-). This may not be what notebooks were
designed for at
> all.

And I agree with the differing....

OK, how about "it's really good at this sort of thing" :slight_smile: