panel don't scale

Hi list,

I've got a line in a flexsizer like this:

ST TC panel ST TC panel ST TC panel

The flexsizer is told that columns 2, 5 & 8 are growable,
however if I give a proportion of 3 to the last panel, design
don't change - why is that?

JY

···

--
To fear love is to fear life, and those who fear life are already
three parts dead. -- Bertrand Russell

Proportions in sizers have a range 0.0 to 1.0, values >1.0 evaluate to
1.0. try changing the other 2 to a proportion of 0.5 and the last to 1
and you should get the last twice the size of 2 & 5.

Gadget/Steve

···

On 09/12/2011 9:12 AM, Jean-Yves F. Barbier wrote:

Hi list,

I've got a line in a flexsizer like this:

ST TC panel ST TC panel ST TC panel

The flexsizer is told that columns 2, 5 & 8 are growable,
however if I give a proportion of 3 to the last panel, design
don't change - why is that?

JY

Thanks

···

On Fri, 9 Dec 2011 10:48:33 +0000 Gadget/Steve <GadgetSteve@live.co.uk> wrote:

Proportions in sizers have a range 0.0 to 1.0, values >1.0 evaluate to
1.0. try changing the other 2 to a proportion of 0.5 and the last to 1
and you should get the last twice the size of 2 & 5.

--

Proportions in FlexGridSizers are evaluated for the column, not to the items. When you call AddGrowableRow pass the proportion values you want as the 2nd parameter.

···

On 12/9/11 1:12 AM, Jean-Yves F. Barbier wrote:

Hi list,

I've got a line in a flexsizer like this:

ST TC panel ST TC panel ST TC panel

The flexsizer is told that columns 2, 5& 8 are growable,
however if I give a proportion of 3 to the last panel, design
don't change - why is that?

--
Robin Dunn
Software Craftsman

That's not true, although it would have made more sense if it was done that way. You can think of the proportion value as the number of "shares" of the free space that an item (or row/col) will get. Just like shares of stock in a company, how that number translates to a percentage depends on how many total shares that there are. For example, if items get proportion values like 1, 1, and 3 then there are 5 total shares and the items get 20%, 20% and 60% of the free space respectively.

···

On 12/9/11 2:48 AM, Gadget/Steve wrote:

On 09/12/2011 9:12 AM, Jean-Yves F. Barbier wrote:

Hi list,

I've got a line in a flexsizer like this:

ST TC panel ST TC panel ST TC panel

The flexsizer is told that columns 2, 5& 8 are growable,
however if I give a proportion of 3 to the last panel, design
don't change - why is that?

JY

Proportions in sizers have a range 0.0 to 1.0, values>1.0 evaluate to
1.0. try changing the other 2 to a proportion of 0.5 and the last to 1
and you should get the last twice the size of 2& 5.

--
Robin Dunn
Software Craftsman