Home Component Writing
New Blog Posts: Merging Reports - Part 1 and Part 2

zoom mouse pointer

edited September 2004 in Component Writing
hi,
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?

regards

Comments

  • 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
    http://www.digital-metaphors.com


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.