I have a panel whose AutoScroll = true;
I can scroll the panel using scrollbars.
I also find mousewheel “vertical scroll” with “mouse” wheel by writing:
void panelInner_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
{
panelInner.Focus();
}
However, I want to scroll horizontally by “wheeling mouse + shift” too.
What do I need to do for that to happen?
In your designer file, you’ll need to manually add a MouseWheel event delegate.
Then, in your code behind, you can add the following.
References: