开发者

How to direct mousewheel scrolling to VS.net 2005 comboboxes rather than parent form?

开发者 https://www.devze.com 2023-03-13 10:26 出处:网络
I have an application.It is one form, and different menu options load other forms into the main content area.

I have an application. It is one form, and different menu options load other forms into the main content area.

Where the child forms fit into this main content area and don't have their own vertical scrollbars, clicking in one of their comboboxes allows scrol开发者_运维问答ling through the combobox options using the mousewheel.

Where the forms are too long for the main content area and DO have their own vertical scrollbars, clicking in one of their combobox does not allow scrolling through the combobox options using the mousewheel. The mousewheel causes the form to scroll instead of the combobox options. I would like to change that, so that the wheel will scroll through the options instead of scrolling the form it is placed on. How?


Possibly, override the MouseWheel event. Or check if the ScrollBars are visible on the Form; if so, force Focus to the ComboBox.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号