DarrenDuck
Topic Author
Posts: 2
Joined: 02 Mar 2022, 11:53

Scroll left/right on PC

02 Mar 2022, 12:01

Hello,

I was wondering if there is a way to scroll left/right on PC without having to click and drag on the scroll bar?

I have tried:
ctrl + mouse wheel
shift + mouse wheel
mouse wheel buttons "Scroll Left" + "Scroll Right"

Any ideas?

Thanks,
Darren
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: Scroll left/right on PC

04 Mar 2022, 12:09

You can modify NoesisView.cs script to inject the horizontal mouse wheel event when shift modifier is active, it is a bit of a hack but it is the easiest way:
if (ev.delta.y != 0.0f)
{
  if ((ev.modifiers & EventModifiers.Shift) == 0)
  {
    _uiView.MouseWheel((int)mouse.x, (int)mouse.y, -(int)(ev.delta.y * 40.0f));
  }
  else
  {
    _uiView.MouseHWheel((int)mouse.x, (int)mouse.y, (int)(ev.delta.y * 40.0f));
  }
}
A more advance approach would be to define a Behavior that you will attach to the control containing the ScrollViewer, so you can handle the PreviewMouseWheel event yourself: https://stackoverflow.com/a/42047117
 
DarrenDuck
Topic Author
Posts: 2
Joined: 02 Mar 2022, 11:53

Re: Scroll left/right on PC

04 Mar 2022, 12:38

Thanks for the assitance!
 
User avatar
jsantos
Site Admin
Posts: 4822
Joined: 20 Jan 2012, 17:18
Contact:

Re: Scroll left/right on PC

04 Mar 2022, 12:45

Having to modify NoesisView.cs is far from ideal. Maybe we could implement this feature and enable it with a macro (defaulted to off by default to be WPF compliant).

Who is online

Users browsing this forum: No registered users and 7 guests