Flex 3 - 在按钮栏中获取 focusIndex
我一直在研究如何在出现 mouseOver/Out 事件时获取 ButtonBar 的 focusIndex 属性,但没有发现任何有用的东西。
预先感谢您的帮助。
问候,
BS_C3
编辑 1
假设我们有这个按钮栏:
我想知道,当滚动时,目标按钮。
在侦听鼠标悬停事件的函数中放置一个断点,这就是我在调试视图中看到的内容:
As你可以看到,有一个 focusIndex 变量奇怪地没有记录......
I've been looking around on how to get the focusedIndex property of a ButtonBar when there's a mouseOver/Out event, but haven't found nothing useful.
Thanks in advance for your help.
Regards,
BS_C3
EDIT 1
Assuming we have this button bar:
I'd like to know, when rolling over, the target button.
Putting a break point in a function that listens to the mouseover event, this is what I see in the debug view:
As you can see, there's a focusedIndex variable that's is strangely not documented...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该值是 mx_internal 值。
只需在导入时使用这个魔法:
那么您应该能够访问按钮栏鼠标处理程序中的值,而不会出现问题:
作为澄清点; ButtonBar 类的属性;不在事件类上,就像您最初所说的那样。 ButtonBar 实例嵌入在鼠标事件中。我以前听说过所谓的“嵌套对象”。
The value is an mx_internal value.
Just use this magic when yo do imports:
Then you should be able to access the value in your button bar's mouse hander w/o issues:
As a point of clarification; the property on the ButtonBar class; not on the event class, like you originally stated. The ButtonBar instance is embedded inside the Mouse Event. I've heard that called Nested Objects before.