Questions tagged [mousewheel]

A mouse wheel (or scroll wheel) is a hard plastic or rubbery disc (the "wheel") on a computer mouse that is perpendicular to the mouse surface. It is used for scrolling.

1072 questions
19
votes
6 answers

Horizontal Scrolling on React Component Using Vertical Mouse Wheel

I have a component that resizes into a horizontal row of bootstrap cards when in a smaller desktop window. For users without a horizontal mouse wheel and not using a touchpad, I would like to allow users to scroll horizontally using their vertical…
beznet
  • 532
  • 1
  • 5
  • 13
19
votes
2 answers

Does WPF have mouse wheel scrolling up and down event

I checked msdn. For event related to mouse wheel, there is only one option -- UIElement.MouseWheel What I want to do is listening to mouse wheel scrolling forward(up) and backward(down) event. Note: Not clicking the middle wheel button.
dongx
  • 1,750
  • 4
  • 17
  • 37
19
votes
1 answer

Mousewheel event not firing

I've looked at this thread concerning the exact same problem but that solution didn't work for me. Basically what I am trying to accomplish is a mouse wheel event when the user is interacting with a chart control on a windows form. Right now I have…
tmwoods
  • 2,353
  • 7
  • 28
  • 55
16
votes
5 answers

Pass mousewheel event through fixed content

The best way to understand this is to look at this fiddle. Notice how mouse wheel over the fixed content in the red box does nothing. I would like the scrollable div to scroll. In case the fiddle dies - basically I have a scrollable div with a…
mrtsherman
  • 39,342
  • 23
  • 87
  • 111
15
votes
3 answers

How can I handle the mouse wheel click event in WPF?

I want to close a tab in my tab control when the mouse wheel is clicked. How can I capture this event in WPF? EDIT: Here's the code: private void tabMain_MouseDown(object sender, MouseButtonEventArgs e) { if(e.ChangedButton ==…
ScottG
  • 10,711
  • 25
  • 82
  • 111
14
votes
4 answers

Why is WheelDelta = 120?

I'm working with mouse events, specifically OnMouseWheel. Many code samples refer to distance the view changes (or zoom f.i. in 3D application) as Distance = Sign(WheelDelta)*Constant or Distance = WheelDelta / WHEEL_DELTA or something of that kind…
Kromster
  • 7,181
  • 7
  • 63
  • 111
14
votes
4 answers

JQuery Mousewheel: How to disable?

I am using jquery.mousewheel.js as a part of the jQuery jScrollPane plugin. I want to disable the mousewheel at some point. Could someone please recommend a jQuery statement that can do it? Thank you!
Dimitri Vorontzov
  • 7,834
  • 12
  • 48
  • 76
14
votes
4 answers

Cancel wheel event with e.preventDefault in react event bubbling

I am trying to prevent window scrolling with e.preventDefault() when a wheel event is fired but browser scrolls no matter what.
Yellow Page
Femi Oni
  • 796
  • 2
  • 9
  • 25
14
votes
2 answers

Prevent page navigation on horizontal scroll

I am using a mac trackpad.How to prevent the page going back and next to visited pages on horizontal scroll ?. I tried to prevent the wheel events but it doesn't works most of the time. container.addEventListener('wheel', function(ev) { …
Prasanna Rkv
  • 419
  • 4
  • 12
14
votes
4 answers

MouseWheel event doesn't fire when using any control with scrolbars (in C# Windows Forms)

MouseWheel event doesn't fire when I' am using any control (ListBox, Panel, TextBox) with scrollbars. To reproduce problem: public class Form1 : Form { private readonly Button button1; private readonly TextBox textBox1; private void…
halorty
  • 644
  • 1
  • 7
  • 11
13
votes
2 answers

How can I make WPF ScrollViewer middle-click-scroll?

Clicking the middle mouse button (aka: mouse wheel) and then moving the mouse down slightly lets users scroll in IE, and most Windows apps. This behavior appears to be missing in WPF controls by default? Is there a setting, a workaround, or…
Tion
  • 1,470
  • 17
  • 27
13
votes
7 answers

Numericupdown mousewheel event increases decimal more than one increment

I'm trying to override the mousewheel control so that when the mouse wheel is moved up or down it only increases the value in the numericupdown field by 1. I believe it is currently using what is stored in the control panel and…
JonF
  • 2,336
  • 6
  • 38
  • 57
13
votes
3 answers

Prevent parent page from scrolling when mouse is over embedded iframe in Firefox

...without limiting the scroll inside the iframe or the need to specifically name/tag all scrollable elements. Imagine google maps widget embedded in parent page. When you zoom in the widget you don't want the parent page to scroll, obviously. I…
daniel.sedlacek
  • 8,129
  • 9
  • 46
  • 77
13
votes
3 answers

How to make NumericUpDown ReadOnly

I would like to make WinForms NumericUpDown control non-editable or at least spin control should be disabled. I tried setting the control readonly but using mouse scroll values are changing. Please help me to achieve this.
Shilpa
  • 412
  • 3
  • 14
13
votes
6 answers

jQuery Mousewheel Scroll Horizontally

I'm currently developing a horizontally website that can enable my mouse scroll to scroll to the left and right... My jQuery included sequence: