开发者

Adding two icons on left and right on spark button

开发者 https://www.devze.com 2023-03-25 12:59 出处:网络
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?

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

精彩评论

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

关注公众号