The default value is "vertical".
The HBox container lays out its children in a single horizontal row.
The VBox container lays out its children in a single vertical column.
Test the following code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Label text="This is the first Label"
fontSize="10"/>
<mx:HBox>
<mx:Label text="This is the second Label in the application" fontSize="15" />
<mx:Label text="This is the third Label in the application" fontSize="15" />
</mx:HBox>
<mx:VBox>
<mx:Label text="This is the fourth Label in the application" fontSize="20" />
<mx:Label text="This is the fifth Label" fontSize="20" />
</mx:VBox>
</mx:Application>
Output:
No comments:
Post a Comment