仅滚动鼠标即可自动滚动列表框 [英] auto-scroll listbox with only mouseover

查看:76
本文介绍了仅滚动鼠标即可自动滚动列表框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以使滚轮工作而无需特别指定控件的焦点?因此,我可以将鼠标悬停在列表框上并滚动而不会失去对我正在使用的文本框的关注?

REALbasic为我自动执行了此操作,只是想知道如何在VB.NET中执行此操作.

Is there a way to have the scroll wheel work without specifically giving a control the focus? So i can just mouse over a listbox and scroll without loosing focus on the textbox i''m using?

REALbasic did it automatically for me, just wondering how to do it in VB.NET.

推荐答案

有鼠标进入和鼠标离开事件,以及鼠标移动.没有自动的方法可以执行所需的操作,但是您可以编写执行此操作的代码.您可能会发现移动列表可以使它具有焦点,您可能必须使它明确地将焦点返回到文本框.
There are mouse enter and mouse leave events, as well as mouse move. There''s no automatic way to do what you want, but you could write code that does it. You may find that moving the list gives it focus, you may have to make it return focus to the textbox, explicitly.


这篇关于仅滚动鼠标即可自动滚动列表框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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