Laying out a long form in Flex
I was working on the layout for a data input form in Flex. No matter how creative I got, I was not going to be able to fit everything on a single screen without scroll bars. The content did not suit itself to being split into tabs, or other similar types of UI. I did not want the buttons at the bottom to scroll off the screen, I wanted the user to always be able to see them. I also wanted a header to remain on the screen at all times too.
I spent quite a few hours playing with verticalScrollPolicy properties on my various nested VBox controls, without much success. When I finally stumbled upon the answer, I thought I should share it.
The trick is to use a Canvas control for the scrollable area. Here is a code excerpt and a demo:
