|
-
Nov 29th, 2005, 05:47 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Middle mouse button scroll on Panel
I have a winform that has a Panel that covers the whole form. The panel is scrollable but will only scroll with the side scrollbars and not the mouse's scroll wheel.
Any idea's how to fix this?
-
Nov 29th, 2005, 07:37 AM
#2
A control has to have focus to scroll with the mouse wheel. Given that a Panel cannot receive focus I'd say that you're out of luck. Controls like TextBoxes and ListBoxes will scroll with the mouse wheel no problem, but they can receive focus.
Your only option would be to handle the MouseWheel event for each control within the Panel and then try to translate that into scrolling the Panel itself, which you'd have to do in code yourself. Note though that for controls that react to scroll events themselves you probably shouldn't scroll the Panel.
Last edited by jmcilhinney; Nov 29th, 2005 at 07:42 AM.
-
Nov 29th, 2005, 08:43 AM
#3
Thread Starter
Frenzied Member
Re: Middle mouse button scroll on Panel
Thanks for your advice jmcilhinney. I managed to get around it by having a tiny blank label on the panel and giving it focus on form load.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|