VerticalAlign for VGroup and HorizontalAlign for HGroup
Recently I checked in the major axis alignment update to VGroup, HGroup, VerticalLayout, HorizontalLayout. It brings parity to the Flex 4 Spark layouts relative to the MX containers HBox and VBox that are well known from previous versions of Flex (and have had those alignment options for long time now).
Now VGroup and VerticalLayout have a “verticalAlign” property with the three supported values of “top“, “middle“, “bottom“. Accordingly HGroup and HorizontalLayout get a “horizontalAlign” property with the supported values of “left“, “center” and “right“. The alignment modes work for the layouts with and without virtualization enabled.
An important difference to note is that when “clipAndEnableScrolling” is set to “true” and the containers are scrolling (the content is bigger than the container), the Spark layouts ensure that the entire content can be scrolled in view by internally reverting to the “top“/”left” alignment respectively.
When playing with the attached sample, you’ll notice difference between the clipping and the non-clipping containers when scrolling is in effect (drag the slider left to force smaller height for the containers).
The sample was compiled with SDK version 18.104.22.16853, source: MajorAxisAlignment.mxml