size of wxNotebook

David Bolen db3l at
Mon Jan 13 17:56:51 CET 2003

Jacek Popławski <jp at no.more.hosts> writes:

> PS. What is wrong with self.NotebookSizer.SetMinSize(wxSize(300,200))? Why it
> extends 300x200?

That's a "hint" to the control as to what it should declare its
minimum size to be (supplied to parent controls who may try to resize
it), but it won't necessarily stop it from taking on larger sizes (nor
probably even smaller sizes in some cases) if appropriate based on the
environment into which you insert the control.

You mention using several sizers, but don't specifically enumerate
what types (horizontal/vertical) they are nor how they are nested.
Also you don't mention which of them you are allowing to expand (in
either the primary or secondary directions) which is crucial in
understanding how they might resize the windows they enclose.  By
using sizers you are explicitly instructing the system to resize
windows according to those sizers - while they will try to obey
minimum size hints for their child windows, they may also expand the
child windows if they have enough space to do so.

A wxFrame is designed to have a single child, and it will
automatically resize that single child to be the full size of the
enclosing frame.  So if you've made one of your sizers the single
child of the frame, and allowed expansion of the sizers, then the
natural course of events would be to resize all the enclosed windows
(based on the sizer ratios) until the entire frame was full.
If you post some of your actual code creating your frame class, along
with a little more detail about what you are trying to achieve, we
could probably make some more detailed suggestions.

-- David
 \               David Bolen            \   E-mail: db3l at  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \

More information about the Python-list mailing list