开发者

Make the Flex4 Button look exactly like the Flex3 Button

If I had a button in Flex3

<mx:Button label="Testing" cornerradius='5'/>

And I want to cha开发者_运维问答nge this to Flex4

<s:Button label="Testing" styleName="buttonStyle"/>
<fx:Style>
    .buttonStyle{
    corner-radius:5;
    font-weight:bold;
}
</fx:Style>

What all do I need more to make the Flex 4 button, look exactly like the Flex 3 button?

The things that I can see right now are 1. The mouse-over-button gradients are very different. 2. The border for Flex4 button is different from Flex3.

How do I fix these two conditions, and are there more differences as well?


What happens if you use the halo theme?

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f85.html

http://blog.flexexamples.com/2009/07/14/using-the-halo-theme-in-flex-4/

Basically, set this compiler argument:

-theme=${flexlib}/themes/Halo/halo.swc


This can be easily done by creating a custom skin for the button.

<s:Button label="Testing" skinClass="com.myApp.Flex3ButtonSkin"/>

And inside the Skin class, modify the mxml objects within to make it look like the Flex 3 Button. With skin classes you can make the buttons and any other component look like anything.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜