[wxPython-users] Another sizer question
Christopher Barker
Chris.Barker at noaa.gov
Sun Nov 11 10:30:48 PST 2007
Alun Griffiths wrote:
> 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
well, yes, but when you call SetSizerAndFit() you're asking the frame to
fit itself, so if plot doesn't have a min size, it could get shrunk
down. Try plot.SetSizeHints()
> 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
yup -- but only in the direction of the box -- try:
box.Add(self.plot, 1, wx.EXPAND)
it may help.
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list