When using Sizers, you must create a special βStatic Boxβ, which is Sizer, and contains the static box that you want to use. This is done by:
self.foo = wx.StaticBoxSizer(self.box, wx.ORIENT)
This means that your Static Box must be created in advance and is the argument that was passed to the Sizer. From there, the Sizer behaves exactly like a regular Sizer. This is what I got while correcting your code:
# Date and Graph Type Selection self.dateLbl = wx.StaticBox(self, -1, 'Date Range:', size=(240, 140)) self.dategraphSizer = wx.StaticBoxSizer(self.dateLbl, wx.VERTICAL)
What gives this result:

source share