Author Topic: Scroll bars missing in a window containing a wxGrid.  (Read 4287 times)

Offline Grouch

  • Multiple posting newcomer
  • *
  • Posts: 40
Scroll bars missing in a window containing a wxGrid.
« on: August 11, 2016, 07:12:31 pm »
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.

Offline Grouch

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Scroll bars missing in a window containing a wxGrid.
« Reply #1 on: August 12, 2016, 03:21:16 am »
Well, as has happened before, after more hours of frustrating trial and error I have more or less answered my own question. I have shared the answer in wxSmith tutorial 10. The screen shots that illustrate the process are not yet in the tutorial but should arrive there within a few days. Getting .png or .jpg files into a wiki remains a complicated and labor-intensive process.

Please take a look at the tutorial and edit as seems appropriate.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3352
Re: Scroll bars missing in a window containing a wxGrid.
« Reply #2 on: August 12, 2016, 11:16:24 am »
thank you! The wiki needs quite some update work...

Offline Grouch

  • Multiple posting newcomer
  • *
  • Posts: 40
Re: Scroll bars missing in a window containing a wxGrid.
« Reply #3 on: August 12, 2016, 06:34:31 pm »
wxSmith Tutorial 10, Using wxGrid is now available, complete with screenshots. If interested, please have a look. It is the result of an incredible number of trials with tiny details that seemed plausible but prevented the grid from working properly.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: Scroll bars missing in a window containing a wxGrid.
« Reply #4 on: August 12, 2016, 08:16:20 pm »
wxSmith Tutorial 10, Using wxGrid is now available, complete with screenshots. If interested, please have a look. It is the result of an incredible number of trials with tiny details that seemed plausible but prevented the grid from working properly.
Great && thanks - thats really appreciated. :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ