开发者

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>


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜