HorizontalLayout
August 13, 2010
HorizontalLayout is one of the four default layouts provided by Flex 4. When applied to a container, it arranges visual components in a single horizontal row. Additional summary information can be found in The Basic Layouts.
Usage
<s:Group> ... <s:layout> <s:HorizontalLayout gap="10" /> </s:layout> </s:Group>
Params
- gap
- The space between items in pixels.
- horizontalAlign
- The horizontal alignment of the row of items within the container. Values:
left,center,right. - verticalAlign
- The vertical alignment of the row of items within the container. Values:
top,middle,bottom. - paddingLeft, paddingRight, paddingTop, paddingBottom
- The spacing in pixels between the boundaries of the container and the row of items within the container.
BONUS: HorizontalLayout Cheat Sheet (PDF, 257k)
Sample
Flash is required. Get it here!
full screen | view source | download
Author
Layout by Adobe and Evtim The Godfather Georgiv and sample by Justin
Dudunegrinhu
Is there any way to add a horizontal scrollbar?!?! Because I want a fixed width size but when you have more boxes the vertical scrollbar automatically appears.
justin
@Dudunegrinhu: Just set
horizontalScrollPolicyon the container.