VBox上未触发Flex鼠标滚轮事件
|
VBox的鼠标滚轮滚动出现问题。当鼠标悬停在VBox的任何组件或垂直滚动条上时,它可以正常工作,但是当鼠标悬停在VBox的背景上时,不会发生滚动。
<mx:VBox width=\"100%\" height=\"150\">
<s:Label text=\"A large label.\" height=\"100\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A large label.\" height=\"100\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A label.\" />
<s:Label text=\"A label.\" />
</mx:VBox>
我查看了VBox和Container的代码(VBox继承了该代码。)当垂直滚动条存在时,Container向其自身添加了MouseEvent.MOUSE_WHEEL侦听器。我在此函数中设置了一个断点,但仅当鼠标悬停在子组件上时才调用该断点。
作为最后的尝试,我尝试设置mouseEnabled,focusEnabled和其他一些随机属性,但这些都不起作用。
有谁知道如何使VBox正确动作并在鼠标悬停在其上方时滚动?提前致谢。
(由于不希望的捕捉行为,目前无法切换到Spark Scroller。)
没有找到相关结果
已邀请:
2 个回复
薄扩络拜
弛保矮瘦敖