0

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>
Constantiner
  • 14,231
  • 4
  • 27
  • 34
monica
  • 1
  • 1
    You've got to provide more detail. Where are {decorator} and {icon} coming from, for example? More code would help us help you. – Sam DeHaan Aug 02 '11 at 13:58

1 Answers1

0

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.

M.D.
  • 1,886
  • 1
  • 13
  • 14