# Viewport and mouseWheel

**URL:** <https://forum.juce.com/t/viewport-and-mousewheel/2935>\
**Category:** General JUCE discussion\
**Created:** [June 12, 2008, 2:01pm UTC](https://forum.juce.com/t/viewport-and-mousewheel/2935 "2008-06-12T14:01:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [June 12, 2008, 2:01pm UTC](https://forum.juce.com/t/viewport-and-mousewheel/2935/1 "2008-06-12T14:01:16Z")

</div>

Hi Jules,

It would be great if in a viewport with only an horizontal scrollbar,  
the mouseWheelY(the most common one) would scroll too.  
It seems to be handled partially in Viewport but after that the scrollbar only take the wheel value of its orientation.

Maybe something like  
float increment = fabs(wheelIncrementY) \> fabs(wheelIncrementX) ? wheelIncrementY : wheelIncrementX;  
in ScrollBar::mouseWheelMove would be better.

or something specific in Viewport.

Thanks,

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 13, 2008, 9:11am UTC](https://forum.juce.com/t/viewport-and-mousewheel/2935/2 "2008-06-13T09:11:05Z")

</div>

A problem I can think of with that is that if someone has a bi-directional wheel, it’ll respond to both wheels, which would be a bit confusing. And there’s no way of telling whether a mouse has a horizontal wheel or not.
