Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Distinguish wheelmouse from
Distinguish wheelmouse from [message #462394] Tue, 11 October 2005 22:17 Go to next message
Paul Wells is currently offline Paul WellsFriend
Messages: 4
Registered: July 2009
Junior Member
I want to be able to use the wheelmouse for zooming.

Adding a listener for SWT.MouseWheel type events was easy enough - but the
problem is that rolling the mouseWheel now causes zooming *and* scrolling.

How can the default behavior of the wheelmouse - scrolling - be disabled?

I already have selection listeners on the scroll bars which handle the
actual scrolling; so if there was any way to distinguish between scroll
events originating from clicking of the arrow buttons, and rolling of the
mousewheel, then I could solve the problem.

However, events originating from these actions are identical in every way.
In particular Event.detail == SWT.ARROW_DOWN or SWT.ARROW_UP for both
cases.

Is there any way to tell them apart?

Thanks
Distinguishing mousewheel events from arrow events [message #462396 is a reply to message #462394] Tue, 11 October 2005 22:24 Go to previous messageGo to next message
Paul Wells is currently offline Paul WellsFriend
Messages: 4
Registered: July 2009
Junior Member
Just realized that wasn't a very good title -
Re: Distinguish wheelmouse from [message #463383 is a reply to message #462394] Fri, 04 November 2005 19:13 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Try setting doit=false in the event.

"Paul Wells" <paul.wells@modelistic.com> wrote in message
news:8b15542309eb75042d0ece75096e8d00$1@www.eclipse.org...
> I want to be able to use the wheelmouse for zooming.
>
> Adding a listener for SWT.MouseWheel type events was easy enough - but the
> problem is that rolling the mouseWheel now causes zooming *and* scrolling.
>
> How can the default behavior of the wheelmouse - scrolling - be disabled?
>
> I already have selection listeners on the scroll bars which handle the
> actual scrolling; so if there was any way to distinguish between scroll
> events originating from clicking of the arrow buttons, and rolling of the
> mousewheel, then I could solve the problem.
>
> However, events originating from these actions are identical in every way.
> In particular Event.detail == SWT.ARROW_DOWN or SWT.ARROW_UP for both
> cases.
>
> Is there any way to tell them apart?
>
> Thanks
>
>
>
>
>
Previous Topic:Expandable Composite problem.
Next Topic:GC.drawArc/fillArc results in different effects when antialias on/off?
Goto Forum:
  


Current Time: Thu Apr 25 19:55:19 GMT 2024

Powered by FUDForum. Page generated in 0.09181 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top