GridCustTable - problem with getting scroll bars to show

I used GridCustTable from the demo as a template for my code, when I run
it standalone I get the scroll bars.

Now when I move the relevant portions of the code into my program
(basically everything EXCEPT the class testframe) I don't get the scroll
bars anylonger (except when I click within the grid).

Everything is sitting on a wxDialog, then to add the grid I create a
panel (if I don't give a size to it then it doesn't show at all,
actually I have to give a size to the panel AND to the wxGrid), and then
I add it all to a rowcolSizer, as seen below.

        p = wxPanel(self, -1, style=0, size=(200, 120))
        self.CuveeGrid = CuveeTableGrid(p, ds=self.ds, cbPKey=self.cbPKey)
        rcSizer.Add(p, row=10, col=0, flag=fgFlag,
                                    rowspan=5, colspan=5)

Initially I did it without the panel, the grid shows, if I give a size,
but also no scroll bars.

Appreciate any hints/help on this.

See you
Werner

Werner F. Bruhin wrote:

I used GridCustTable from the demo as a template for my code, when I run
it standalone I get the scroll bars.

Now when I move the relevant portions of the code into my program
(basically everything EXCEPT the class testframe) I don't get the scroll
bars anylonger (except when I click within the grid).

Everything is sitting on a wxDialog, then to add the grid I create a
panel (if I don't give a size to it then it doesn't show at all,
actually I have to give a size to the panel AND to the wxGrid), and then
I add it all to a rowcolSizer, as seen below.

       p = wxPanel(self, -1, style=0, size=(200, 120))
       self.CuveeGrid = CuveeTableGrid(p, ds=self.ds, cbPKey=self.cbPKey)
       rcSizer.Add(p, row=10, col=0, flag=fgFlag,
                                   rowspan=5, colspan=5)

Initially I did it without the panel, the grid shows, if I give a size,
but also no scroll bars.

Does calling self.CuveeGrid.AdjustScrollBars() help?

For the size issues you need to do something to manage the sizing of the grid too, not just the panel.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!