[wxPython-users] Another sizer question

Alun Griffiths alun.griffiths at dsl.pipex.com
Sun Nov 11 10:16:03 PST 2007


Mak

thanks for the quick reply but now I'm confused!  The first line of 
the constructor for self.plot is

         wx.Frame.__init__(self, parent, wx.ID_ANY, size=(320,100), 
title='Production profile')

which I assumed set the size.  I also thought that

         box.Add(lhsSizer, 0)
         box.Add(self.plot, 1)

meant that if box got resized that alll the resizing would be done by 
self.plot and lhsSizer would not change

Alun Griffiths


At 17:18 11/11/2007, you wrote:

>eShopping wrote:
> > apologies for asking another sizer question - I think I get the hang
> > of them, don't use wxPython for a while then get stuck again.  Anyway,
> > I am trying to plot a matplotlib graph in the same window as some text
> > controls using a box sizer.  The matplotlib window works fine as a
> > standalone window but when I add it to the "main" window, (a) it does
> > not appear and (b) I can't use the text controls.  Hopefully, this is
> > simple fix for someone more knowledgeable but I am struggling.
> >
> > Thanks in advance
> >
>
> >
> >         box.Add(lhsSizer, 0)
> >
> >         # Load the plot window and add to sizer
>stop :) - as far U have added some items to sizer - but self.plot doesnt
>define minimum size nor anything what deals with frame size :) -
>consider - min size for this item is 0
> >
> >         self.plot = PlotFrame(self)
> >
> >         box.Add(self.plot, 1)
> >
> >         # Add the sizer to the panel
> >
> >         panel.SetSizerAndFit(box)
>nice but - plot window isnt shown - just because sizer reduces its size to 0
>
>
>mak





More information about the wxpython-users mailing list