FLEX - 禁用滚动条的 mousescroll?

发布于 2024-12-26 05:44:44 字数 127 浏览 4 评论 0原文

我正在寻找一种在滚动鼠标时禁用垂直和水平滚动条滚动的方法。

我使用鼠标滚动来放大和缩小,并且我不希望滚动条在滚动鼠标滚轮时滚动。 (但我确实需要滚动条可见)。

有办法做到这一点吗?

提前致谢!

I'm looking for a way to disable the scrolling of the vertical and horizontal scrollbars when scrolling the mouse.

I use the mouse scroll to zoom in and out, and I don't want the scrollbars to scroll while scrolling the mouse wheel..
(But I do need the scrollbars to be visible).

Any way to do this?

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

痴情换悲伤 2025-01-02 05:44:44

尝试下面的一个,我不确定,但它可能会起作用。

我正在修改代码,这对代码来说有点作弊,所以我不确定我是否会工作,但试试这个。

[DivideBoxID].addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);


public function mouseWheelHandler():void
{
    //Leave this space blank..  
}

try the following one i am not sure but it might be work.

I am modifying the code its a bit of cheat with the code so i am not sure that i will work but just try this one.

[DivideBoxID].addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);


public function mouseWheelHandler():void
{
    //Leave this space blank..  
}
︶ ̄淡然 2025-01-02 05:44:44
[DivideBoxID].addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);

public function mouseWheelHandler():void
{
    e.stopImmediatePropagation(); 
}
[DivideBoxID].addEventListener(MouseEvent.MOUSE_WHEEL,mouseWheelHandler);

public function mouseWheelHandler():void
{
    e.stopImmediatePropagation(); 
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文