I am having trouble using wxSmith to get scrollbars on a window containing a wxGrid. Here is what I have done:
In Code::Blocks on the main menu click wxSmith, pick wxDialog, and give the file the name MatGridDialog. On the Resources tab of the Management pane (lower left part of the screen), click the triangle to the left of the Code::Blocks symbol. Click the triangle to the left of “wxDialog” and then the one to the left of “MatGridDialog”. Add a box sizer, into it put a panel; onto the panel put another box sizer; and into it, a Grid (found on the Advanced) tab. In the Properties browser, set the grid to have 40 rows and 40 columns, click the + to the left of Style and click the boxes for vertical and horizontal scrollbars and and Full-repaint-on-resize. Check the Expand box. (It would not be there if we had not put the box sizer onto the panel and the Grid into the sizer.)
The screen showing our creation has the scrollbars and they work. But click the “Show preview” button on the right below the big red X, and you get the upper left part of the grid and no scrollbars. Moreover, if you click into the grid and move the cursor out of the area shown, it disappears. There is no scrolling. When the dialog is displayed by a program, it is the “Show preview” behavior we get, not the desired behavior with the scrollbars.
I have tried various levels for the scrollbars in the elements above the wxGrid, but always with the same results.
Any help would be much appreciated.