开发者

Flex Button CSS skinning

开发者 https://www.devze.com 2022-12-26 21:20 出处:网络
I have a CSS file containing the following definition : .Tab{ up-skin:Embed(skinClass=\'XUpSkin\'); over-skin:Embed(skinClass=\'XOverSkin\');

I have a CSS file containing the following definition :

.Tab{
    up-skin:Embed(skinClass='XUpSkin');
    over-skin:Embed(skinClass='XOverSkin');
    disabled-skin:Embed(skinClass='XDisabledSkin');
}

And a Flex file : 开发者_JS百科

<mx:Button id="b1" style="Tab"/>

Now, I want to use the disabled-skin defined in the CSS, as the upSkin of b1.

So something like

b1.setStyle("upSkin","Tab.disabled-skin");

But I am struggling with the exact syntax of the second argument for setStyle.

What should I use for the second argument for setStyle method?


b1.setStyle("upSkin", b1.getStyle("disabled-skin") );

0

精彩评论

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

关注公众号