You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PrivateSubtabcontrolAboutWindow_MouseWheel(senderAsObject,eAsMouseEventArgs)HandlestabcontrolAboutWindow.MouseWheel' Getting the mouse scroll direction was based on this SO answer:' https://stackoverflow.com/a/2378365' Allows the tabs to be scrolled with the mouse, like in many' Linux applications.' Perhaps this could be made into a sub with args for easier reuse.' Ensure the mouse isn't in the tabpage itself.' This is based on this SO answer:' https://stackoverflow.com/a/21098227DimtabpageAsTabPage=tabcontrolAboutWindow.SelectedTabIfNottabpage.ClientRectangle.Contains(tabpage.PointToClient(Control.MousePosition))ThenIfe.Delta>0Then' If scrolling down, go left.IftabcontrolAboutWindow.SelectedIndex-1=-1Then' If the next tab is out of bounds, select the last tab.tabcontrolAboutWindow.SelectTab(tabcontrolAboutWindow.TabCount-1)Else' Otherwise, select the tab to the left.tabcontrolAboutWindow.SelectTab(tabcontrolAboutWindow.SelectedIndex-1)EndIfElse' If scrolling up, go right.IftabcontrolAboutWindow.SelectedIndex+1>tabcontrolAboutWindow.TabCount-1Then' If the next tab is out of bounds above the usable tab indexes,' select the first tab.tabcontrolAboutWindow.SelectTab(0)Else' Otherwise, select the next tab to the right.tabcontrolAboutWindow.SelectTab(tabcontrolAboutWindow.SelectedIndex+1)EndIfEndIfEndIfEndSub
The text was updated successfully, but these errors were encountered:
Code available in this Gist:
https://gist.github.com/DrewNaylor/b2d79180090f8fd5d1dfd0dda2d39c06
Copied here in case something happens to it:
The text was updated successfully, but these errors were encountered: