Spark column layout

Im currently working on an application, which contains lots of forms - Flex has already lots of tools to make forms, but i found complicated (you need to skin form items,lots of embedded containers), and slow for lot of displayed items. In Spark a single form item; for example a label and a text input creates 9 UIComponents - just look at the source of FormItemSkin.
I needed a simple way to create forms, so i made a layout that makes it easy to display forms, and its fast. The result is ColumnLayout, a custom layout, where one can set column sizes (either in percent or with fixed values), and its items get layed out according to these values. It can do a few extra stuff too: You can specify fixed row height (by default row height is the largest row element), vertical aligment of elements in rows, and padding values.

An example:

Download source.

No comments:

Post a Comment