Search code examples
c#scrollpanelmousewheel

How can I scroll my panel using my mousewheel?


I have a panel on my form with AutoScroll set to true so a scrollbar appears automatically.

How can I make it so a user can use his mouse wheel to scroll the panel? Thanks SO.


Solution

  • The panel or a control in the panel must have focus. Note that if the control with focus has scroll bars, it will scroll instead of the panel.