0 Replies Latest reply on Jan 12, 2010 8:19 PM by Bertrand G.

    GridBagLayout class...

    Bertrand G. Level 1

      ... well not really, but this might be useful for you as well:

       

       

      FreeLayout class

       

       

      For my software I needed a new layout that I could just throw the components inside a group and they would arrange themselves automatically.

      I have done this by extending the flex LayoutBase class and overriding the updateDisplayList method (code attached)

       

       

      This layout is a flexible layout manager that aligns components vertically and horizontally, without requiring that the components be of the same size.

      The components are arranged in a grid with their native size, with no overlapping and fitting the parent component in width. The row height is calculated to be the max height of the components in the row.

       

       

      Example of possible layout determined only by the component sizes:

       

      +------------------+-----------------+

      |        1         |       2         |

      +-----------+------+----------+------+

      |     3     |        4        |


      +-----------+-----------------+---+

      |                                 |
      |                5                |
      |                                 |


      +-----------+-----------------+---+

      |     6     |        7        |

      |           +-----------------+

      +-----------+

       

      Hope you enjoy, and tell me if you find any problems.