使 Flex4 按钮看起来与 Flex3 按钮一模一样
如果我有一个 Flex3 按钮
<mx:Button label="Testing" cornerradius='5'/>
,我想将其更改为 Flex4
<s:Button label="Testing" styleName="buttonStyle"/>
<fx:Style>
.buttonStyle{
corner-radius:5;
font-weight:bold;
}
</fx:Style>
我还需要什么才能使 Flex 4 按钮看起来与 Flex 3 按钮一模一样?
我现在能看到的东西是 1. 鼠标悬停在按钮上的渐变效果非常不同。 2. Flex4按钮的边框与Flex3不同。
我该如何解决这两个问题,是否还有更多差异?
If I had a button in Flex3
<mx:Button label="Testing" cornerradius='5'/>
And I want to change 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用光环主题会发生什么?
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/
基本上,设置此编译器参数:
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:
通过为按钮创建自定义外观可以轻松完成此操作。
在 Skin 类中,修改其中的 mxml 对象,使其看起来像 Flex 3 Button。通过皮肤类,您可以使按钮和任何其他组件看起来像任何东西。
This can be easily done by creating a custom skin for the button.
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.