Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] MouseEvent Question

Hi,
 
  I got a problem on the value of Event.y.  For example,
 
 SrcolledComposite sc = new ScrolledComposite(parent, SWT.V_SCROLL);
 sc.setLayout(new FillLayout());
 sc.setLayoutData(new GridData(GridData.Fill_BOTH);
 
 Composite co = new Composite(sc, SWT.NONE);
 co.setLayout(new FillLayout());
 co.setLayoutData(new GridData(GridData.Fill_BOTH);
 sc.setContent(co);
 
 co.setSize(500, 90000);
 
 co.addListener(SWT.MouseDown, new Listener() {
    public void handleEvent(Event e) {
      System.out.println("Y: " + e.y);
    }
 )};
 
    The output of Y is 32267 when I scolled to the bottom and clicked on the bottom line.  If I set the height of co under 30000, there is no that problem.  The mouse event can show the accurate y location of mouse.  Have you got any idea of it?
 
Clement

Back to the top