Flex 4 Concentric Layout

August 16, 2009

Layouts in Flex 4 are decoupled from containers and its quite simple to define your own layout. Yesterday I wrote ConcentricLayout.

ConcentricLayout arranges layout elements in such a way that their centers are aligned and their size sequentially decreases. The width of each layout element is less than the previous element by a value specified using the horizontalGap property and the height of each layout element is less than the previous element by a value specified using the verticalGap property. If the element has an explicit width or an explicit height it still aligns its center but is not resized. You can tell the layout to force a resize of all elements and ignore their explicitly specified size using the forceResize flag

Here’s a quick example:

View Source

Download Source

 

6 Responses - What do you think?

  1. Nice use of layouts and what you can do :-)

  2. a good example of a layout in Gumbo, thx

  3. This is where OpenLazlo was really powerful, other then a beautiful syntax (unlike the current ActionScript + MXML mélange)

    This + event bubbling aka Mate allows for a good RIA app realizable in Flex.

  4. @Satish Could you clarify what you mean when you say .. “current ActionScript + MXML mélange”?
    I haven’t spent much time with Laszlo

    _
    Mrinal
    P.S its funny you use “was” with OpenLaszlo :)

  5. [...] more elaborate examples you may want to checkout the ConcentricLayout example I posted last week or Ryan Campbell’s very cool 3D Layouts. Evtim, an engineer on the [...]

  6. [...] ejemplos de layouts Layout concéntrico Random layout Artículo sobre layouts Wheel [...]

Your thoughts or questions: