Friday, October 05, 2007

wxPython - Multiple Panels Without Tab Control

Wanted to display multiple Panels, one at a single time the rest hidden. Without showing the tabs. Found this gem on the wxPython news group from Robin Dunn:

to have no tabs at all but still show a page window? If so, then
you can do that simply but not using the notebook at all when you don't
want the tabs. Just put all the page windows in a box sizer, each with
proportion=1 and wx.EXPAND flag set, and Hide() all but the one you want
to be visible. If you need to change which is visible then Hide() the
current one, Show() the other and call sizer.Layout().

1 comment:

ScW said...

thanks! this helped me find what I was looking for very quickly...

Clarification, it's good to remember that pretty much all controls are the same... you can show/hide and re-layout for any of the controls... doesn't have to pages or panels..