wxpython - wx.GridBagSizer + wx.StaticBoxSizer: How to automate span calculation -
i have following following window generated using function called createstaticboxsizer staticbox3 contains empty spaces @ end of dont want to. i contain no empty space. noticed if put span staticbox3 7 gives result want automate process of generating span opposed hard-coding it: the code uses span based on number of items creates, if creates 8 items within boxsizer, uses span of 8. i can't understand why wrong can please clarify? should span corresponding to? also staticbox::4 intruding on row of staticbox::1 why doesn't expand staticbox::3 does? the code generate follows: import wx import wx.lib.inspection class myregion(wx.frame): = 0 def __init__(self, parent): wx.frame.__init__(self, parent, title="my region") gridsizer = wx.gridbagsizer() gridsizer.add(self.createstaticboxsizer(4), pos=(0,0), span=(4,1), flag=wx.expand) gridsizer.add(self.createstaticboxsizer(4), pos=(4,0), span=(4,1), flag=wx.expand) ...