FlexGridSizer not resizing custom control
Jeffrey Barish
jeff_barish at earthlink.net
Thu Dec 7 22:10:54 PST 2006
Robin Dunn wrote:
> You need to tell the sizer that you want the item to expand to fill the
> space it is given. With the box sizer you used a proportion=1, which
> means that the item should share all extra space in the same direction
> that the sizer is (wx.HORIZONTAL in this case) with any other
> proportional items. The grid sizers don't use the proportions
> currently, but you can tell it to fully expand the item using the flags
> parameter.
>
> sizer.Add(StretchLine(self), 0, wx.EXPAND)
Thanks, all.
This seems a perfect opportunity to ask about a statement on p. 340 of the
book:
If you use proportional sizing on one of your growable rows or columns, you
need to specify a proportional amount on all the growables in that
direction, otherwise you will get an odd flicker effect on resize as
wxPython tries to deal with a proportion of zero.
This is what I thought I was doing by specifying a proportion for the one
item in the growable column 1, although Listing 11.7 doesn't support my
interpretation. It seems that I don't understand this statement in the
book.
--
Jeffrey Barish
More information about the wxpython-users
mailing list