Learning my way through this stuff and could use some help. I’m trying to have a wxStaticBox with a label and a multiline text box inside of it (almost like a log that the app will print to…)
Here’s as far as I’ve been able to get:
self.sb_FoldersToScan = wx.StaticBox(panel, label="Folders to Scan:", size=(200,100))
boxSizer = wx.StaticBoxSizer(self.sb_FoldersToScan, wx.VERTICAL)
boxSizer.Add(self.sb_FoldersToScan, flag=wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT)
multiText = wx.TextCtrl(panel, -1,"test",size=(200, 100), style=wx.TE_MULTILINE)
multiText.SetInsertionPoint(0)
boxSizer.Add(multiText)
sizer.Add(boxSizer, pos=(1, 0), span=(1, 6), flag=wx.EXPAND|wx.TOP|wx.LEFT|wx.RIGHT)
I’ve cobbled most of this off the internet — not trying to do anything right now other than get the layout fixed…
The multiText box shows up directly underneath the StaticBox rather than inside of it? Am I using the wrong control for this?
I think your problem is that you are adding the static box itself to the sizer. If you delete the
line, I suspect it’ll work.