Remember that I haven't tried this, but my guess to your problem is that you
have the grids being owned by the notebook instead of by the panel. The
grids, therefore, aren't part of any page, but rather are all stacked on top
of each other on top of the notebook. Try changing this to:
grids[xlIdx] = wxGrid( panels[xlIdx], -1, ...
···
On Thu, 05 Sep 2002 10:25:29 -0700, Rolf Marvin B?e Lindgren <r.m.b.lindgren@usit.uio.no> wrote:
I am trying to set up a tabbed notebook. the idea of the design is
that each tab shows a different grid and a "Next->"-button. the user
can browse the grids by clicking on the tabs, and click on "Next->"
when the appropriate notebook tab has been found.unfortunately, I can't make it work. the "Next->" button is
implemented correctly - I can even make each "Next->" button have
different texts. but all the grids show the same. the values of the
grids are read successively from an array, but all tabs display the
values of the _last_ element of the array. debugging code however
shows that the data entered into the grid are correct.
...
notebook = wxNotebook(self, -1, size=(450,300))xlIdx = 0
for xlData in excelData:
grids = grids + [None]
panels = panels + [None]panel_sizers = panel_sizers + [None]
panel_sizers[xlIdx] = wxBoxSizer(wxVERTICAL)panels[xlIdx] = wxPanel(notebook, -1, style = wxNO_BORDER)
debug ("xlData.name = " + repr(xlData[0]))
grids[xlIdx] = wxGrid(parent = notebook, id = -1,
pos = wxPoint(-1,-1),
size = wxSize(320,200),
name = repr(xlData[0]))
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.