Stretching of a growable column in a gridbagsizer does not work with version 2.8.12.1 of wxPython, which is the newest version of Ubuntu 12.04. This can easily be demonstrated in the demo application.
The problem in the demo is due to the gbs not being added to the box sizer with the proportion and flag values that would cause it to be expanded when the box sizer has more space available to it. Changing the last few lines of TestFrame.__init__ to look like the following takes care of the problem:
box = wx.BoxSizer()
box.Add(gbs, 1, wx.ALL|wx.EXPAND, 10)
p.SetSizer(box)
self.SetClientSize(p.GetBestSize())
If you are seeing something similar in your own application then it may be a similar issue. Try adding the WIT and using it to highlight the gbs before and after the window has been resized to ensure that the gbs is resized too.
http://wiki.wxpython.org/Widget_Inspection_Tool
···
On 9/20/12 1:03 AM, Dick Kniep wrote:
Stretching of a growable column in a gridbagsizer does not work with
version 2.8.12.1 of wxPython, which is the newest version of Ubuntu
12.04. This can easily be demonstrated in the demo application.
--
Robin Dunn
Software Craftsman
Hi Robin,
Thanks for the response, however, this does not solve the complete problem. After changing the code as you stated, the size changes in the vertical direction, but not in the horizontal direction.
Dick Kniep
···
Op woensdag 26 september 2012 21:01:38 UTC+2 schreef Robin Dunn het volgende:
On 9/20/12 1:03 AM, Dick Kniep wrote:
Stretching of a growable column in a gridbagsizer does not work with
version 2.8.12.1 of wxPython, which is the newest version of Ubuntu
12.04. This can easily be demonstrated in the demo application.
The problem in the demo is due to the gbs not being added to the box
sizer with the proportion and flag values that would cause it to be
expanded when the box sizer has more space available to it. Changing
the last few lines of TestFrame.init to look like the following
takes care of the problem:box = wx.BoxSizer() box.Add(gbs, 1, wx.ALL|wx.EXPAND, 10) p.SetSizer(box) self.SetClientSize(p.GetBestSize())
If you are seeing something similar in your own application then it may
be a similar issue. Try adding the WIT and using it to highlight the
gbs before and after the window has been resized to ensure that the gbs
is resized too.