wxPython and wxFlexGridSizer problem
Cliff Wells
logiplexsoftware at earthlink.net
Tue Mar 26 15:03:20 EST 2002
On Tue, 26 Mar 2002 11:47:41 -0800
Jeff Shannon wrote:
>
>
> Cliff Wells wrote:
>
> > Also, I notice that your calls to gridSizer.Add are incorrect. The
second
> > argument is supposed to be a boolean flag indicating whether the widget
> > should be expanded in the sizer's primary direction (in the case of a
> > wxFlexGridSizer, I'm not sure what that means, but you still need the
> > argument, at least as a placeholder). The wxALL and wxALIGN_* flags
should
> > be the third argument.
>
> Oooh, I missed that, the first time through. Actually, though, the
second
> argument isn't a boolean, though, it's an integer, which represents the
> weighting given to that item when expanded. (If you add item 1 with
weight 2,
> item 2 with weight 0, and item 3 with weight 1, then any expanded space
will be
> split up, with 2/3 of it going to item 1 and 1/3 going to item 3...)
Ah. I think that when I first started using wxPython I read that but for
some reason couldn't get it working right (sizers can be as painful as they
are helpful) and simply started using 1 or 0 and over time my mental
prototype for this method "corrected" itself to match. I'll have to give
this another try as it would be a useful feature.
Is the meaning of this flag consistent across the different types of
sizers, or is this only for wxBoxSizer?
Thanks.
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
More information about the Python-list
mailing list