Using SetVScrollBarPosition to scroll to Annotation
Using SetVScrollBarPosition to scroll to Annotation
I am using the GdViewer and would like to programatically scroll a document to an existing annotation. With the annotation I have the coordinates of the top-left point of that annotation. Is there any method to calculate what value I would need to put into SetVScrollBarPosition(int) to scroll that annotation into view (preferably to the center of the screen).
Thank you for any guidance.
Thank you for any guidance.
Re: Using SetVScrollBarPosition to scroll to Annotation
Hello,
From my understanding, what you can do to automatically display an existing annotation in the viewer, is to select the page and zoom in regarding the coordinates of the annotation.
Display a page: https://www.gdpicture.com/guides/gdpict ... yPage.html
Get the annotation coordinates: https://www.gdpicture.com/guides/gdpict ... Value.html
Zoom on the annotation: https://www.gdpicture.com/guides/gdpict ... mArea.html
Hope it helps,
Fabio
From my understanding, what you can do to automatically display an existing annotation in the viewer, is to select the page and zoom in regarding the coordinates of the annotation.
Display a page: https://www.gdpicture.com/guides/gdpict ... yPage.html
Get the annotation coordinates: https://www.gdpicture.com/guides/gdpict ... Value.html
Zoom on the annotation: https://www.gdpicture.com/guides/gdpict ... mArea.html
Hope it helps,
Fabio
Re: Using SetVScrollBarPosition to scroll to Annotation
Fabio,
the suggestion sounds good, but what if I'd like to keep the same zoom factor?
the suggestion sounds good, but what if I'd like to keep the same zoom factor?
Re: Using SetVScrollBarPosition to scroll to Annotation
Hello,
Do you mean to keep the zoom at 135% (for instance) but show the annotation in the center of the viewer?
Regards,
Fabio
Do you mean to keep the zoom at 135% (for instance) but show the annotation in the center of the viewer?
Regards,
Fabio
Who is online
Users browsing this forum: No registered users and 2 guests