monica
monica

Reputation: 1

Adding two icons on left and right on spark button

I want to add two icons on spark button.I am using button skin. But the icons are not coming properly. Do anyone is having any idea? The code is:

<s:HGroup width="100%">
<s:HGroup id="iconContainer" top="1" bottom="1" left="0" right="0" 
                  horizontalAlign="{iconPosition}" verticalAlign="middle">
            <mx:Image id="iconImage" source="{icon}" />
        </s:HGroup>

        <s:HGroup id="decoratorContainer"
                  width="100%">
            <s:Label id="labelDisplay"
                     textAlign="center"
                     verticalAlign="middle"
                     maxDisplayedLines="1"
                     horizontalCenter="0" verticalCenter="1"
                     left="0" right="0" top="2" bottom="2">
            </s:Label>
            <mx:Image id="image" source="{decorator}" />
        </s:HGroup>

    </s:HGroup>

Upvotes: 0

Views: 566

Answers (1)

M.D.
M.D.

Reputation: 1896

Give absolute width and height to 'iconImage' and 'image' OR override commitProperties by calling invalidateProperties once the image size is known by the works of {Binding}. Hope it helped.

Upvotes: 0

Related Questions