Switch pages by clicking and holding the left mouse key

Discussions about document viewing.
Post Reply
hardikv
Posts: 43
Joined: Thu Jan 27, 2011 11:46 am

Switch pages by clicking and holding the left mouse key

Post by hardikv » Tue May 15, 2012 7:37 am

Hi,

i want to switch pages on GDViewer control by clicking and holding the left mouse key on the image and sliding up or down.

Example.
i have an image displayed in GDViewer control with 10 pages. now i want to navigate/switch pages in gdviewer like clicking and holding the left mouse key and sliding up or down mouse will change the page, if we sliding mouse up then it will display previous page of image and if we sliding mouse down then it will display next image in gdviewer control.

i have used lates GDPicture control library 8.5.29. Please provide me solution with example.

Thanks in advance.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Switch pages by clicking and holding the left mouse key

Post by SamiKharma » Sun Jun 03, 2012 1:50 pm

Hi,

You can implement what you need in the Mouse_Down Event in the GdViewer. Then you have to design a length of formula:
PreviousOnePage: that is the distance between the mouse and the top of the viewer divided by the number of previous pages.
AfterOnePage: the distance between the mouse and the bottom of the viewer divided by the number of pages left.

Upon moving you can basically call the GdPicture Functions DisplayNextPage and DisplayLastPage.

We will not implement such a feature, but you can easily implement it if you follow the above instructions.

Best Regards,
Sami

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests