Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » MouseMoveListener issue on AIX.
MouseMoveListener issue on AIX. [message #448070] Thu, 30 December 2004 12:14 Go to next message
strus is currently offline strusFriend
Messages: 113
Registered: July 2009
Senior Member
Hi,
Why my canvas.addMouseMoveListener(new MouseMoveListener() {
public void mouseMove(MouseEvent e) {
System.out.println("Here: "+e.button);
}});
always displayed 0 !! ??

This works fine in:
canvas.addMouseListener(new MouseAdapter() {
public void mouseDown(MouseEvent pEvent) {
System.out.println("button: "+pEvent.button);
}});
Platform:AIX, ppc, motif

Thanks.
Re: MouseMoveListener issue on AIX. [message #448165 is a reply to message #448070] Tue, 04 January 2005 17:20 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
The button field is only set on mouse down or mouse up. Use the stateMask
field in mouse move. To understand why it is this way, consider that more
than one button can be pressed when the mouse is moving.

"strus" <strus_fr@yahoo.fr> wrote in message
news:cr0rfg$d35$1@www.eclipse.org...
> Hi,
> Why my canvas.addMouseMoveListener(new MouseMoveListener() {
> public void mouseMove(MouseEvent e) {
> System.out.println("Here: "+e.button);
> }});
> always displayed 0 !! ??
>
> This works fine in:
> canvas.addMouseListener(new MouseAdapter() {
> public void mouseDown(MouseEvent pEvent) {
> System.out.println("button: "+pEvent.button);
> }});
> Platform:AIX, ppc, motif
>
> Thanks.
>
>
Previous Topic:CCombo problem
Next Topic:Button with text and image
Goto Forum:
  


Current Time: Sat Dec 05 15:13:54 GMT 2020

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

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

Back to the top