Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ScrolledComposite bug
ScrolledComposite bug [message #457965] Fri, 08 July 2005 08:20
Eclipse UserFriend
Originally posted by: clement.chu.csse.monash.edu.au

Hi,

I created a composite for drawing and added it into ScrolledComposite.
The size of the drawing composite is set to (500, 90000) and I added some
listeners (MouseDown, DragDetech) when I initalized it. My problem is
that the y-coordinate of the mouse cannot be returned the correct value
when I scrolled to the last page. The return value of y is 32213. The
interesting thing is that only MouseEvent to return the wrong value.
DragDetech is returned the accurate value of the y-coordinate when I
started to drag. For example,

Composite drawComp = new Composite(sc, SWT.NONE);
drawComp.addListener(SWT.MouseDown, myListener);
drawComp.addListener(SWT.DragDetect, myListener);

Listener myListener = new Listener() {
public void handleEvent(Event e) {
switch (e.type) {
case SWT.MouseDown:
System.out.println("Down: " + e.y);
break;
case SWT.DragDetect:
System.out.println("Drag: " + e.y);
break;
}
}
};


The output is as follows:
Up: 32213
Drag: 86570

I tried to add other mouse listeners(MouseUp, MouseHover, etc). They
still got the same error as above. Anyone have the same the problem?

Clement
Previous Topic:path problem in workspace project!!!!!
Next Topic:How to get tree item from item name?
Goto Forum:
  


Current Time: Tue Apr 30 16:49:26 GMT 2024

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

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

Back to the top