Notebook doesn't expand it's components ..

hello,

I had the following form:
MiniFrame
   >__SplitterWindow
             >__Window
             >__PlotCanvas

Now I needed some extra settings information on the form,
so I decided to insert a notebook into the above construct
MiniFrame
   >__NoteBook
             >__SplitterWindow
                       >__Window
                       >__PlotCanvas

Now I only see a small rectangle of about 16*16 at the first page of the notebook.
I think I'm missing something with sizers, I tried some things, but none succeeded.
From the demos it does't become clear to me what I'm doing wrong,
but that's probably because the demos use the demoframe.
Any suggestions ?

thanks,
Stef Mientki

class tScope_Form( wx.MiniFrame ):
  def __init__( self, parent = None, Pos = (50,50)):
    self.parent = parent
    self.New_Data = False

    FormStyle = wx.DEFAULT_FRAME_STYLE | wx.TINY_CAPTION_HORIZ
    if parent:
      FormStyle = FormStyle | wx.FRAME_FLOAT_ON_PARENT # needs a parent

    my_form = wx.MiniFrame.__init__(
        self, parent, -1, 'JALsPy Scope',
        size = ( 600, 400 ),
        pos = Pos,
        style = FormStyle)

    NB = wx.Notebook ( self, -1,
                       size = ( 600, 400 ),
                       style = wx.BK_LEFT )

    p1 = wx.Panel ( NB )
    NB.AddPage ( p1, "Scope" )
    p2 = wx.Panel ( NB )
    NB.AddPage ( p2, "Setting" )

    # *****************************************************************
    self.Splitter = wx.SplitterWindow ( p1, 11, style = wx.SP_LIVE_UPDATE )

    self.Panel_Left = wx.Window ( self.Splitter, style = wx.BORDER_SUNKEN )
    self.Canvas = plot.PlotCanvas ( self.Splitter )

    self.Splitter.SplitVertically ( self.Panel_Left, self.Canvas, -400 )
    self.Splitter.SetMinimumPaneSize(20)
    # *****************************************************************
    self.Panel_Left.SetBackgroundColour("pink")

Stef Mientki <s.mientki <at> ru.nl> writes:

    NB = wx.Notebook ( self, -1,
                       size = ( 600, 400 ),
                       style = wx.BK_LEFT )

    p1 = wx.Panel ( NB )
    NB.AddPage ( p1, "Scope" )
    p2 = wx.Panel ( NB )
    NB.AddPage ( p2, "Setting" )

    # *****************************************************************
    self.Splitter = wx.SplitterWindow ( p1, 11, style = wx.SP_LIVE_UPDATE )

you need to put that SplitterWindow in a sizer:

box = wx.BoxSizer(wx.VERTICAL)
box.Add(self.Splitter, 1, wx.EXPAND)
p1.SetSizer(box)

Christian

thanks Cristian,
that was the solution.

cheers,
Stef

Christian K. wrote:

···

Stef Mientki <s.mientki <at> ru.nl> writes:

    NB = wx.Notebook ( self, -1,
                       size = ( 600, 400 ),
                       style = wx.BK_LEFT )

    p1 = wx.Panel ( NB )
    NB.AddPage ( p1, "Scope" )
    p2 = wx.Panel ( NB )
    NB.AddPage ( p2, "Setting" )

    # *****************************************************************
    self.Splitter = wx.SplitterWindow ( p1, 11, style = wx.SP_LIVE_UPDATE )
    
you need to put that SplitterWindow in a sizer:

box = wx.BoxSizer(wx.VERTICAL)
box.Add(self.Splitter, 1, wx.EXPAND)
p1.SetSizer(box)

Christian

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org