FlexGridSizer.AddGrowableRow/Col problem.
1 answers - 1206 bytes -

Hello everyone,
I just noticed a slight problem with the growable handling of the
FlexGridSizer. If I'm calling the AddGrowableRow/Col twice for the same
row/col, the proportion between two items is no longer the same when
resizing the window, ie. the item having the growable set twice will
grow larger than the other one.
Here's an example code that you could paste into the sizers test code in
the wxPython demo.
def makeGrid3(win):
gs = wx.FlexGridSizer(2,1)
gs.AddMany([(SampleWindow(win,'one'),0, wx.EXPAND),
(SampleWindow(win, 'two'), 0, wx.EXPAND)
])
gs.AddGrowableRow(0)
gs.AddGrowableRow(1)
# the extra call will make the first row grow larger than
# the second row
gs.AddGrowableRow(0)
return gs
Now running the "Flexible Grid" test case will show you what I mean.
I know, that not calling AddGrowableRow/Col multiple times will of
course "fix" this problem. But I feel that this should probably be taken
care of in a lower level.
, this is with wxPython2.6.0.0 on Linux, and I've also seen the same
behaviour with 2.6.1.0 on msWin.
Cheers,
Jan
No.1 | | 1206 bytes |
| 
Jan Finell wrote:
Hello everyone,
I just noticed a slight problem with the growable handling of the
FlexGridSizer. If I'm calling the AddGrowableRow/Col twice for the same
row/col, the proportion between two items is no longer the same when
resizing the window, ie. the item having the growable set twice will
grow larger than the other one.
Here's an example code that you could paste into the sizers test code in
the wxPython demo.
def makeGrid3(win):
gs = wx.FlexGridSizer(2,1)
gs.AddMany([(SampleWindow(win,'one'),0, wx.EXPAND),
(SampleWindow(win, 'two'), 0, wx.EXPAND)
])
gs.AddGrowableRow(0)
gs.AddGrowableRow(1)
# the extra call will make the first row grow larger than
# the second row
gs.AddGrowableRow(0)
return gs
Now running the "Flexible Grid" test case will show you what I mean.
I know, that not calling AddGrowableRow/Col multiple times will of
course "fix" this problem. But I feel that this should probably be taken
care of in a lower level.
Hmm Some might consider this to be a feature. ;-)
Please enter a bug report about it with a category of "Common".