How do I make any wxPython widget (like wx.Panel or wx.Button) automatically expand to fill its parent window?
The short answer: use a sizer with a proportion of 1 and the wx.Expand tag.
So here I am in the init of a panel
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.canvas, 1, wx.EXPAND)
self.SetSizer(sizer)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With