How to scroll the image to a make a region visible
How to scroll the image to a make a region visible
I am a beginner. I would like to know how can I scroll the image to make a specific region in the image visible?
I have tried:
annotMgr.SelectPage(pageToShow);
gdViewer1.LockViewer = true;
gdViewer1.ZoomArea(1, 1 , 2000 , 500);
gdViewer1.LockViewer = false;
gdViewer1.Redraw();
But the result is, the page moves to the "pageToShow", but the region presented is always he middle of the page. In the example above I would like to zoom to the top of the page
What I am doing wrong?
Thanks in advance,
Robson Reis
I have tried:
annotMgr.SelectPage(pageToShow);
gdViewer1.LockViewer = true;
gdViewer1.ZoomArea(1, 1 , 2000 , 500);
gdViewer1.LockViewer = false;
gdViewer1.Redraw();
But the result is, the page moves to the "pageToShow", but the region presented is always he middle of the page. In the example above I would like to zoom to the top of the page
What I am doing wrong?
Thanks in advance,
Robson Reis
Re: How to scroll the image to a make a region visible
Hello,
There is a method for such purpose named EnsureRegionVisibility().
See: https://www.gdpicture.com/guides/gdpicture/web ... ility.html
Kind regards,
Loïc
There is a method for such purpose named EnsureRegionVisibility().
See: https://www.gdpicture.com/guides/gdpicture/web ... ility.html
Kind regards,
Loïc
Re: How to scroll the image to a make a region visible
Loic, thanks for the reply, but I have 2 problems:
1) When I do gdViewer. I can´t find in intelisens the EnsureRegionVisibility
2) If I solve issue 1, how can I get the RegionId? Do I need to create a Region and then call the EnsureRegionVisibility?
Thanks
Robson Reis
1) When I do gdViewer. I can´t find in intelisens the EnsureRegionVisibility
2) If I solve issue 1, how can I get the RegionId? Do I need to create a Region and then call the EnsureRegionVisibility?
Thanks
Robson Reis
Re: How to scroll the image to a make a region visible
Complementing my previous post, in version 11.1.14 the method EnsureRegionVisibility is not available in gdViewer. I am stucked here.
Re: How to scroll the image to a make a region visible
Hello,
Actually I am not sure about what you are trying to do, but if the goal is to scroll the page to the stop-left of the page you can use the SetHVScrollBarPosition() method.
see: https://www.gdpicture.com/guides/gdpicture/web ... ition.html
So you would obtain something like:
Please let me know if you need further assistance on this.
With best regards,
Loïc
Actually I am not sure about what you are trying to do, but if the goal is to scroll the page to the stop-left of the page you can use the SetHVScrollBarPosition() method.
see: https://www.gdpicture.com/guides/gdpicture/web ... ition.html
So you would obtain something like:
Code: Select all
gdViewer1.LockViewer = true;
gdViewer1.ZoomArea(1, 1 , 2000 , 500);
gdViewer1.SetHVScrollBarPosition(0,0);
gdViewer1.LockViewer = false;
gdViewer1.Redraw();
With best regards,
Loïc
Re: How to scroll the image to a make a region visible
Loïc,
Many thanks. I have managed with your tips. You can close the case.
many thanks for your support.
Robson Reis
Many thanks. I have managed with your tips. You can close the case.
many thanks for your support.
Robson Reis
Re: How to scroll the image to a make a region visible
Loïc, just to confirm, the method EnsureRegionVisibility(). is not available in the version I am using, right?
Re: How to scroll the image to a make a region visible
Hi Rob, no the EnsureRegionVisibility() should be available in your edition. It has been introduced in the 11.1.14 release.
See the change log here: viewtopic.php?t=4810
See the change log here: viewtopic.php?t=4810
Re: How to scroll the image to a make a region visible
I can´t find in the documentation:
GdPicture11 Namespace > GdViewer Class : EnsureRegionVisibility Method
But when I write
gdViewer1. , in the intelisense I can see
...
EnableTextSelection
EndInvoke NO EnsureRegionVisibility
Enter
Equals
...
GdPicture11 Namespace > GdViewer Class : EnsureRegionVisibility Method
But when I write
gdViewer1. , in the intelisense I can see
...
EnableTextSelection
EndInvoke NO EnsureRegionVisibility
Enter
Equals
...
Re: How to scroll the image to a make a region visible
Just correcting my previous reply, in the documentation I CAN FIND the method EnsureRegionVisibility. But in the class I can't.
Re: How to scroll the image to a make a region visible
I have found I had an old GDPicture dll in the path. Now I have the latest and I can find the EnsureRegionVisibility. THANKS!
Who is online
Users browsing this forum: No registered users and 1 guest