The way I do that is to use a sizer to divide the button list from the
space where the panels will appear. Then the panels will be bound
together in a boxsizer (direction does not matter as at most one will be
visible at all times). Then use show/hide on the panels as you need to
turn one on or off.
Note that after you have switched panels a Fit() and a Layout() on the
parent to make everything render right.
Paul
Phillip Watts wrote:
···
This was easy in Tkinter years ago, though I've forgotten
the how.
I want to have a a frame with a bunch of buttons on the left.
They will select which panel to bring to the top.
The right 4/5 of the frame will be ten panels in a stack and
with show/hide or whatever, I want to bring the appropriate
panel to the top.(or maybe they should be frames?).
Anyway I want the main frame, with the buttons, to be the
container and the panels, all same size, to exactly fit on
top of each other. The panels will all have different buttons,
text controls etc.
How to? Thanks
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
--
Paul Sijben tel: +31334566488
Eemvalley Technology BV fax: +31334557523
the Netherlands http://eemvalley.com
-----------------------------------------------------
EemValley Technology werft python & wxpython
programmeurs: http://www.eemvalley.nl/jobs
The way I do that is to use a sizer to divide the button list from the
space where the panels will appear. Then the panels will be bound
together in a boxsizer (direction does not matter as at most one will be
visible at all times). Then use show/hide on the panels as you need to
turn one on or off.
Note that after you have switched panels a Fit() and a Layout() on the
parent to make everything render right.
I understand the sizers for the buttons and panel space.
I understand the show/hide.
But what does
Then the panels will be bound together in a boxsizer
mean? How do you code that? What puts them in the same
"location"?
···
On Friday 30 May 2008 08:43:32 Paul Sijben wrote:
Phillip Watts wrote:
The way I do that is to use a sizer to divide the button list from the
space where the panels will appear. Then the panels will be bound
together in a boxsizer (direction does not matter as at most one will be
visible at all times). Then use show/hide on the panels as you need to
turn one on or off.
Note that after you have switched panels a Fit() and a Layout() on the
parent to make everything render right.
I understand the sizers for the buttons and panel space.
I understand the show/hide.
But what does
Then the panels will be bound together in a boxsizer
mean? How do you code that? What puts them in the same
"location"?
sizer=wx.BoxSizer(…)
sizer.Add(panel1…)
sizer.Add(panel2…)
etc…
the sizer will make them “correctly” layouted on the parent. If only
one of the panels is shown at a time thet are always in the same
location.
Sizers take some getting used to but look at the sizer examples in the
wiki and elsewhere and you’ll soon get the hang of them.
Paul
···
-- Paul Sijben tel: +31334566488
Eemvalley Technology fax: +31334557523
the Netherlands
http://eemvalley.com