How can I place a wx.Panel inside another wx.Panel? Just a small test program which doesn’t work:
import wx
class TstApp(wx.App):
def OnInit(self):
self.frame = wx.Frame(None, -1, "TstApp", wx.DefaultPosition,
wx.DefaultSize)
self.pn = wx.Panel(self.frame, -1)
self.pn2 = wx.Panel(self.pn, -1)
self.btn = wx.Button(self.pn2, -1, "A Button")
self.frame.Show()
self.SetTopWindow(self.frame)
return True
app = TstApp(0)
app.MainLoop()
As phineas has already said, you should just use a sizer to arrange your widgets. But if you REALLY want to put multiple panels next to each other, then you can use a sizer for that too.