Author Topic: Problem with column widths when using the wxFlexGridSizer  (Read 2358 times)

Offline richrobin

  • Single posting newcomer
  • *
  • Posts: 7
Problem with column widths when using the wxFlexGridSizer
« on: October 11, 2016, 12:57:18 pm »
Today I was trying tutorial6 of the wxSmith tutorials.  I carried out the exact instructions and got the correct preview of the frame window. However, when I compiled and ran the window the left column was twice the width it was in the preview and the right column was not wide enough to display the button text. The buttons were square in appearance. A wxFlexGridSizer was used for the panel as requested by the tutorial6 instructions. All the added controls had proportion set to 1 and expand ticked. The symbol for this sizer on the toolbar has the first column twice as wide as the rest of the coumns.  I am now confused as what the correct behaviour of the wxFlexGridSizer should be.

I have attached a jpeg of the preview and a jpeg of the running application.

I am using the binary installation for windows installed on Vista. Code::Blocks 16.1  mingw 4.9.2 wxWidgets 3.0.2 debug monolithic DLL compiled with the mingw4.9.2 compiler -stdgnu++11 flag set for the 2011 standard.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Problem with column widths when using the wxFlexGridSizer
« Reply #1 on: October 12, 2016, 01:56:47 am »
The tutorials are for older version of wx. And the preview is generated with C::B which uses wx2.8.12, this might cause the discrepancy between the preview and the real world.

The best you can do is inspect the code, read the manual of wx and also experiment to find where the problem is coming from.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]