Hi Fritz,
> until very recently I had been somewhat confused about flex. Just for my
> (hopefully better) understanding:
>
> Is flex really a property of the layout, or isn't it rather a "property" of
> the placement of the widget into the container? If it was a property of the
> layout, wouldn't it then apply to the placement of all widgets inside this
> container (automagically) and wouldn't it then have to be set with something
> like container.setFlex()?

Flex is a per widget layout property, which is used by some layouts to 
determine how the widget is stretched. This is how it works: First the 
layout manager tries to place all widget with their preferred size. If 
there is still space remaining the flex factor determines how much of 
this space is allocated to each widget. The flex factors are relative 
values. If one widget has a flex value of 1 and another a flex value of 
2, the second will receive twice as much from the remaining space. 
Shrinking works similar only that the flex values are inverted so that a 
widget with a larger flex values shrinks by a smaller amount. Note that 
even with flex values in place a widget will never grow beyond its max- 
and min-sizes.

Best Fabian


-- 
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[email protected]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to