|
Re: SWT mouse event problem [message #548757 is a reply to message #547555] |
Thu, 22 July 2010 21:32 |
|
Lakshmi P Shanmugam Messages: 279 Registered: July 2009 Location: India |
Senior Member |
|
|
Hi,
What you are seeing is the correct SWT behavior.
You can try this to see if solves your problem --
The MouseEvent has x and y coordinate values of the mouse pointer when mouse enters or exits. You can add a check to see if the coordinates lie inside or outside the parent composite.
composite.addMouseTrackListener(new MouseTrackAdapter() {
public void mouseExit(MouseEvent e) {
Rectangle rect = composite.getClientArea();
if (!rect.contains(e.x, e.y)) {
//add your composite mouse exit logic here
System.out.println("composite exit ");
}
}
public void mouseEnter(MouseEvent e) {
System.out.println("composite enter");
}
});
Lakshmi P Shanmugam
|
|
|
Powered by
FUDForum. Page generated in 0.02576 seconds