Mouse wheel scroll not working on tab page. C# Win32

If you add a scroll bar to a tab page, the tab will only scroll manually. To make it scroll whenever the mouse is over it add this:

private void tabControl1_MouseEnter(object sender, EventArgs e)
 {
 tabPage1.Focus(); // Otherwise it will not scroll;
 }

 

Lasă un răspuns

Adresa ta de email nu va fi publicată.