Help sizer

I want to have a frame with a gridsizer at the left (50%) and at the right a vertical sizer (50%) with a staticLabel and a listbox. All this work well, but now I want to add a small vertical line (staticLine) between these two sizers, but in all my tries, I'm not able to do this because or I see my line that can resize, when I resize the frame, or it is too big, or..., or...
Can someone help me to do this?

class LayerFrame(wx.Frame):
  def __init__(self,)
   wx.Frame.__init__(self, parent, -1, title, pos=wx.DefaultPosition)
   self.sizerFrame = wx.BoxSizer(wx.HORIZONTAL)
   sizerObjList = wx.BoxSizer(wx.VERTICAL)
   self.ObjList = wx.ListBox(self)
   sizerObjList.Add(wx.StaticText(self, -1, 'List'), 0,
    wx.CENTER | wx.ALIGN_CENTER | wx.ALL, 5)
   sizerObjList.Add(self.ObjList, 1, wx.ALL, 5)
   self.sizerGrid = wx.GridSizer(9,2,1,1)

   #Add some control to sizerGrid
   self.sizerFrame.Add(self.sizerGrid, 1, wx.EXPAND)

   #Here I have the problem...
   self.sizerFrame.Add( wx.StaticLine(self, -1, style=wx.VERTICAL),
    0, wx.ALIGN_TOP | wx.ALIGN_BOTTOM | wx.LEFT | wx.RIGHT, 5)

   #Problem end...
   self.sizerFrame.Add(sizerObjList, 1, wx.EXPAND)

   self.SetSizerAndFit(self.sizerFrame)

Thanks,
Michele

Michele Petrazzo wrote:

  #Here I have the problem...
  self.sizerFrame.Add( wx.StaticLine(self, -1, style=wx.VERTICAL),
   0, wx.ALIGN_TOP | wx.ALIGN_BOTTOM | wx.LEFT | wx.RIGHT, 5)

Try this:

self.sizerFrame.Add( wx.StaticLine(self, -1, style=wx.VERTICAL),
     0, wx.GROW |wx.LEFT | wx.RIGHT , 5)

wx.GROW (or wx.EXPAND, I think they are the same) makes it stretch in the direction perpendicular to the BoxSizer direction.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov