我有一个名为:'GroupNavCustomContainer'的SkinnableContainer类,它使用名为'GroupNavCustomSkin'的skinClass。 GroupNavCustomSkin是Flex为您创建的默认值:( Spark SkinnableContainer容器的默认外观类)。现在,我必须从类外部动态地向GroupNavCustomContainer添加按钮,这不是问题。但是,我似乎无法弄清楚是否让我的皮肤表现为HGroup,因此按钮间隔均匀。我试过了: 修改Group容器无效:
<!--
Note: setting the minimum size to 0 here so that changes to the host component's
size will not be thwarted by this skin part's minimum size. This is a compromise,
more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
-->
<!--- @copy spark.components.SkinnableContainer#contentGroup -->
<s:HGroup >
</s:HGroup>
我是Flex 4.6的新手,所以我确信我在这里错过了一个关键概念。
答案 0 :(得分:0)
<!--
Note: setting the minimum size to 0 here so that changes to the host component's
size will not be thwarted by this skin part's minimum size. This is a compromise,
more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
-->
<!--- @copy spark.components.SkinnableContainer#contentGroup -->
<s:Group id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="475" minHeight="0">
<s:layout>
<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
</s:layout>
</s:Group>