I'm relatively new to programming in wxPython and I have been trying to put a BoxSizer within a wx.Window. This only results in a small square (which is the panel within the BoxSizer) appearing in the window. Could somebody please tell me what I'm doing wrong?
class TestPanel(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, parent, -1, size = (800, 400)) win = wx.Window (self, -1) box = wx.BoxSizer(wx.VERTICAL) panel2 = wx.Panel(win) panel2.SetBackgroundColour("Red") box.Add(panel2, 1, wx.EXPAND, 10) self.SetSizer(box)
Thanks in advance!
Edited 4 Years Ago by happygeek: fixed formatting