# Swipe over multiple buttons

**URL:** <https://forum.juce.com/t/swipe-over-multiple-buttons/9911>\
**Category:** General JUCE discussion\
**Created:** [January 31, 2013, 10:13pm UTC](https://forum.juce.com/t/swipe-over-multiple-buttons/9911 "2013-01-31T22:13:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![splisp](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/splisp/32/91_2.png) [@splisp](https://forum.juce.com/u/splisp)\
**Post date:** [January 31, 2013, 10:13pm UTC](https://forum.juce.com/t/swipe-over-multiple-buttons/9911/1 "2013-01-31T22:13:06Z")

</div>

Hi all,  
I’m trying to implement a behaviour where the user clicks on one a in grid of buttons, then drags the mouse pointer over the surrounding buttons (without releasing the mouse button) and each button along the pointer path gets triggered. The problem is that after the first button has received mouseDown(), the next ones receive no mouse notifications; I have overriden mouseEnter(), but it doesn’t get called until the mouse button is released, as if the first button captures the mouse movements during the drag that started on it. Any suggestions?

-Fabrizio

---

<div class="post-metadata">

**Author:** ![splisp](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/splisp/32/91_2.png) [@splisp](https://forum.juce.com/u/splisp)\
**Post date:** [January 31, 2013, 10:22pm UTC](https://forum.juce.com/t/swipe-over-multiple-buttons/9911/2 "2013-01-31T22:22:49Z")

</div>

Doh! The dox for Component states it clearly:

> [@](#):
>
> When the mouse button is pressed and held down while being moved in or out of a component, no mouseEnter or mouseExit callbacks are made - only mouseDrag messages are sent to the component that the mouse was originally clicked on, until the button is released.

I have an container component hosting the buttons grid… shall I disable the buttons, so they ignore the mouse events and I handle them in the container?

-Fabrizio

---

<div class="post-metadata">

**Author:** ![splisp](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/splisp/32/91_2.png) [@splisp](https://forum.juce.com/u/splisp)\
**Post date:** [January 31, 2013, 10:49pm UTC](https://forum.juce.com/t/swipe-over-multiple-buttons/9911/3 "2013-01-31T22:49:22Z")

</div>

Found this thread is on the same subject:

[http://www.juce.com/viewtopic.php?f=2&t=9437](http://www.juce.com/viewtopic.php?f=2&t=9437)
