Hi there.
I want to code a simple form layout in flex. Something like the following:
[label] [text field]
[label] [text field]
Initially, I've tried coding this using vboxes and hboxes for my layout. Like the following
<hbox>
<vbox>
<label />
<textfield />
</vbox>
<vbox>
<label />
<textfield />
</vbox>
</hbox>
I get burned by performance, if I start reusing this code in an ItemRender or something like that.
I read somewhere that overuse of HBox and VBox is performance heavy because the code must calculate the exact position of these components on its own.
With that answer in mind, I switched over to using Canvas. Something like this:
<canvas>
<label x="0" y="0" />
<text field x="30" y="0" />
<label x="0" y="15" />
<textfield x="30" y="15" />
</canvas>
This starts becoming a nightmare of its own when you want to hide and show certain textfields. Or if you have a textArea and want to use word wrap. I've started dynamically placing objects in the canvas based on the positions of other elements, but it's becoming a maintenance nightmare.
Question:
So, I was wondering if there any Layout Managers for Flex to relieve me of my headaches? Or if there's just a better way of coding my layouts, in general.