# DragToScroll scrolls horizontally even though it shouldn't

**URL:** <https://forum.juce.com/t/dragtoscroll-scrolls-horizontally-even-though-it-shouldnt/19714>\
**Category:** General JUCE discussion\
**Created:** [October 31, 2016, 1:39pm UTC](https://forum.juce.com/t/dragtoscroll-scrolls-horizontally-even-though-it-shouldnt/19714 "2016-10-31T13:39:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![od1](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@od1](https://forum.juce.com/u/od1)\
**Post date:** [October 31, 2016, 1:39pm UTC](https://forum.juce.com/t/dragtoscroll-scrolls-horizontally-even-though-it-shouldnt/19714/1 "2016-10-31T13:39:27Z")

</div>

When using the Viewport and activating the scrollToDrag functionality, the ScrollToDrag wants to scroll horizontally (and vertically) even if it’s deactivated through Viewport::setScrollBarsShown and the horizontal scrollbar is invisible.

Is this a bug or a feature?

---

<div class="post-metadata">

**Author:** ![GarrettBurnett](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@GarrettBurnett](https://forum.juce.com/u/GarrettBurnett)\
**Post date:** [January 22, 2020, 7:05pm UTC](https://forum.juce.com/t/dragtoscroll-scrolls-horizontally-even-though-it-shouldnt/19714/2 "2020-01-22T19:05:21Z")

</div>

Hi, did you ever figure this out?

---

<div class="post-metadata">

**Author:** ![od1](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@od1](https://forum.juce.com/u/od1)\
**Post date:** [January 23, 2020, 12:19pm UTC](https://forum.juce.com/t/dragtoscroll-scrolls-horizontally-even-though-it-shouldnt/19714/3 "2020-01-23T12:19:47Z")

</div>

Nope. I decided to not have it in at all in the end. ☹

---

<div class="post-metadata">

**Author:** ![GarrettBurnett](https://avatars.discourse-cdn.com/v4/letter/g/b4bc9f/32.png) [@GarrettBurnett](https://forum.juce.com/u/GarrettBurnett)\
**Post date:** [January 24, 2020, 5:08pm UTC](https://forum.juce.com/t/dragtoscroll-scrolls-horizontally-even-though-it-shouldnt/19714/4 "2020-01-24T17:08:59Z")

</div>

Disappointing.
