SetSizer, SetSizerAndFit and resizing components

I am not sure I fully understand what you want but I think that you need to define the col/row in the FlexGridSizer which is allowed to grow.

I think it should be this to allow the self.panel.

self.sizer.AddGrowableCol(0)
self.sizer.AddGrowableRow(0)

Werner

···

On 06/13/2011 12:47 PM, Bogdan.Neacsa wrote:

So I have a wx.Frame. To this I have added a main sizer that is a
Vertical box sizer and to this Sizer I have another FlexGridSizer that
holds a GLCanvas and a couple of buttons. Everything worked fine until
I tried adding a functionality that the GLCanvas should resize with
the resizing of the Frame. Up until now I was using SetSizerAndFit but
I found that was a bad practice so I tried using SetSizer() +
Layout(). However if I go with the second approach, the Frame doesnt
resize to Fit the components and the resize still doesnt have the
desired effect. I've started a discussion on StackOverflow about this
but haven't gotten to the bottom of it yet. Here is the link:
wxpython - SetSizer, SetSizerAndFit and resizing components - Stack Overflow

Any help would be appreciated,