代码之家  ›  专栏  ›  技术社区  ›  luca

使用默认值创建HBox组件

  •  1
  • luca  · 技术社区  · 15 年前

    我该怎么做?

    1 回复  |  直到 13 年前
        1
  •  5
  •   Amarghosh    15 年前

    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>