[wxPython-users] Re: FlexGridSizer not resizing custom control
Robin Dunn
robin at alldunn.com
Fri Dec 8 10:30:32 PST 2006
Jeffrey Barish wrote:
>
> 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.
It's talking about the proportion parameter of the AddGrowableRow or
AddGrowableCol methods. If you have more than one growable row/col, and
one of them has a proportion set, then all of them should. You only had
one growable col, so that statement doesn't apply. In the sizers there
is a difference between the space allocated to an item, and how that
item uses that space. In general if you want an item to always fill the
space given to it then you should use the wx.EXPAND flag.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list