Here is a minimal example of my code that should run by itself -- run as is, everything is laid out how I want, 3 rows of nodes spaced evenly:

```
import wx

def createBoxes():
    outVSizer = wx.BoxSizer(wx.VERTICAL)
    outHSizer = wx.BoxSizer(wx.HORIZONTAL)
    outVSizer.AddStretchSpacer(1)
    outHSizer.AddStretchSpacer(1)
    sizer = wx.FlexGridSizer(rows=3, cols=3, vgap=35, hgap=20)

    box = {}
    boxSizer = {}
    text = wx.StaticText(panel, wx.ID_ANY, "This is a test")
    for i in range(6):
        box[i] = wx.StaticBox(panel, wx.ID_ANY, "testBox", size=(0,100))
        #boxSizer[i] = wx.StaticBoxSizer(box[i], wx.VERTICAL)
        #boxSizer[i].Add(text, proportion = 1, flag=wx.ALIGN_CENTER)
        sizer.Add(box[i], flag=wx.EXPAND)
    sizer.AddGrowableCol(0,1)
    sizer.AddGrowableCol(1,1)
    sizer.AddGrowableCol(2,1)

    outHSizer.Add(sizer, flag=wx.EXPAND, proportion=15)
    outHSizer.AddStretchSpacer(1)
    outVSizer.Add(outHSizer, flag=wx.EXPAND, proportion=15)
    panel.SetSizer(outVSizer)

app = wx.App()
frame = wx.Frame(None, size=(500,500))
panel = wx.Panel(frame)
createBoxes()
frame.Show()
app.MainLoop()

```

However, when I uncomment the two commented lines and change the line after those to:

```
sizer.Add(boxSizer[i], flag=wx.EXPAND)

```

The layout gets cramped and the nodes overlap vertically, etc. I can't figure out what I'm doing wrong here, does anyone have a suggestion?