Hello,
Little problem with AddGrowableCol. I do a example grid 2x2 :
On first line, two widget, one in each column (with expand flag).
On second line, one widget but span on two column and with a width more that the first two widget minsize.
Add AddGrowableCol(0) and AddGrowableCol(1)
The result, when the window show, give me that the widget on first line, second column, take all left space. The left space is not shared for all columns with growable.
Note, once the windows showed, the resizing on window keep proportion but with the incorrect size.
So, why the left size is not shared on the two column instead on the last column ?
Version wx : 4.1.0 msw (phoenix) wxWidgets 3.1.4
class MyFrame(wx.Frame):
def __init__(self, parent, id, **dictArg):
super(MyFrame, self).__init__(parent, title = "test")
self.panel = wx.Panel(self, -1 )
self.sizerGrid = wx.GridBagSizer(1, 1)
self.btn1 = wx.Button(self.panel, -1, "1" )
self.sizerGrid.Add( self.btn1, (0,0), flag=wx.EXPAND )
self.btn2 = wx.Button(self.panel, -1, "2" )
self.sizerGrid.Add( self.btn2, (0,1), flag=wx.EXPAND )
self.txtEntry = wx.TextCtrl(self.panel, -1, "", size=(250,-1) )
self.sizerGrid.Add( self.txtEntry, (1,0), (2,2), flag=wx.EXPAND )
self.sizerGrid.AddGrowableCol(0)
self.sizerGrid.AddGrowableCol(1)
self.panel.SetSizerAndFit(self.sizerGrid)
self.Fit()
self.Show()
if __name__ == '__main__':
app = wx.App()
frame = MyFrame(None, -1)
app.MainLoop()