2009-12-07 78 views

回答

5

創建一個HLBox.mxml文件並向其中添加以下代碼。

<!-- HLBox.mxml --> 
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" 
    width="100%" height="100%"/> 

並使用HLBox,就像使用HBox

<HLBox> 
    <!-- Don't specify width or height attributes to HLBox tag, 
     it will overwrite the default ones --> 
    <mx:Label text="something"/> 
    <!-- other children --> 
</HLBox>