0

I have a SkinnableContainer class called: 'GroupNavCustomContainer' that uses a skinClass called 'GroupNavCustomSkin'. The GroupNavCustomSkin is the default one Flex creates for you: (The default skin class for a Spark SkinnableContainer container). Now, I have to add buttons to the GroupNavCustomContainer dynamically from outside the class which is not a problem. However, I can't seem to figure out out to make my skin behave as a HGroup so the buttons are spaced evenly. I tried: modifying the Group container to no avail:

<!--
    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>

I'm fairly new to Flex 4.6, so I'm sure I'm missing a key concept here.

ekad
  • 14,436
  • 26
  • 44
  • 46
Mike6679
  • 5,547
  • 19
  • 63
  • 108

1 Answers1

0

Ahh, figured it out! Horizontal Layout in conjunction with padding. I wish there was some definitive guide somewhere on Flex Spark skinning...

 <!--
        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>
Mike6679
  • 5,547
  • 19
  • 63
  • 108