[wxPython] Missing Sizer feature (BoxSizer)

I've been playing with BoxSizers, and I'm having a problem. It appears that it
is possible for a sizer to take on a negative size in it's secondary dimension,
which allows the window to be collapsed to the point where controls overlap.

To be concrete, I've attached a sample program that demonstrates the effect.
TEST_VALUE defines the option value used when the second item gets added to its
sizer. If TEST_VALUE is 1, the middle control (sizer) does not seem to have a
hard minimum size (although the scroll bar appears when the window goes below
the minimum size reported by the topmost sizer). If TEST_VALUE is 0, shrinking
the window works as desired; obviously, this does not allow the middle control
to expand, so there is wasted space on the window. As I was reading the
wxWindows documentation, I thought that calling SetMinSize() on the sizer might
help, but that API is not exposed in sizers.py. As I write this message, I am
becoming less convinced this would help.

If anyone has a reccommendation on how to deal with this, I'd love to hear it.

Thanks -

    /cco

test.py (2.39 KB)

to expand, so there is wasted space on the window. As I was reading the
wxWindows documentation, I thought that calling SetMinSize() on the sizer

might

help, but that API is not exposed in sizers.py. As I write this message,

I am

becoming less convinced this would help.

If anyone has a reccommendation on how to deal with this, I'd love to hear

it.

SetMinSize is used to change the desired size of an item, not its true
minimum size. If the item is resizeable it has no fixed min or max. The
desired size is used when calculating the min size of parent sizers and for
Fit and SetSizeHints.

If you don't want things to get below a certain size, do Layout and Fit and
then SetSizeHints on the frame (not the sizer) that contains everything.
Then the frame can't get any smaller than what you set it to.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com
http://wxpython.org Java give you jitters?
http://wxpros.com Relax with wxPython!