如何在Flex中手动触发按钮悬停状态? [英] How do I manually trigger a buttons hover state in Flex?

查看:131
本文介绍了如何在Flex中手动触发按钮悬停状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式触发Flex按钮的悬停状态,以便用户将其悬停在其上。有一个关于手动调度事件的弹性页面:

I need to trigger the hover state of a Flex button programatically, so that it looks like the user is hovering over it. There is a flex page about "Manually dispatching events":

http://livedocs.adobe.com/flex/3/html/help.html?content=events_07.html

哪些可以工作,但我真正想做的是更改按钮的样式,而不必投掷事件。如何做到这一点?

Which would work, but what I'd really like to do is change the style of the button without having to throw an event. How can I do this?

谢谢!

推荐答案

任何原因这将不起作用?

Is there any reason this wouldn't work?

button.setStyle('skin', button.getStyle('upSkin'));

这篇关于如何在Flex中手动触发按钮悬停状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆