How do I set the size of a multi-line TextCtrl to always fill its parent panel?
+1
A:
Use a boxSizer
.
When you add your textCtrl
to the sizer set the proportion to 1
and pass the wx.EXPAND
flag, that way your textCtrl
should fill the panel even when the panel is resized
bsizer = wx.BoxSizer()
bsizer.Add(yourTxtCtrl, 1, wx.EXPAND)
Put the following at the end of your panels initialization to set the layout
self.SetSizerAndFit(bsizer)
volting
2010-08-05 23:54:55