Home Component Writing
New Blog Post: Email: Multi-Service

zoom mouse pointer

edited September 2004 in Component Writing
i'm writing custom zoom component.
How to know where (x, y) user has pressed mouse left button and how zoom to
that place? i can use Zoom procedure, but then i don't know how to scrool
page to position user has pressed?



  • edited September 2004

    I think the approach would be to use Viewer.OnMouseDown to get the x,y
    coords. Then use Viewer.Scrollbox.VertScrollbar and HorzScrollbar to
    position the scroll view.

    You might take a look the Delphi Forms.pas unit - the source code to
    TScrollingWinControl.ScrollInView might be helpful.

    Nard Moseley
    Digital Metaphors Corporation

    Best regards,

    Nard Moseley
    Digital Metaphors
This discussion has been closed.