Loading...

Turn annotations on and off

Support for GdPicture XMP Annotations Plugin.

Turn annotations on and off

Postby rgoodson40 » Sat Feb 04, 2012 4:43 am

Hello,

Once you have called the method "AddRectangleHighlighterAnnotInteractive", is it possible to turn this off in code? I want to have a toggle highlight button so if the user turns it off, the highlight functionality will not be active. Currently it only turns off after a highlight has been drawn.

Also, after the highlight has been drawn, the highlight turns off. Is it possible to make this persistent, so that the user can continue to draw highlights on the page without having to go back and click the highlight button again after each time they highlight an area?

Thank you,
Reagan
rgoodson40
 
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Turn annotations on and off

Postby Loïc » Sun Feb 05, 2012 1:37 pm

Hello,

Once you have called the method "AddRectangleHighlighterAnnotInteractive", is it possible to turn this off in code?


Yes it is. See: CancelLastAnnotInteractiveAdd() method.
Also, after the highlight has been drawn, the highlight turns off. Is it possible to make this persistent, so that the user can continue to draw highlights on the page without having to go back and click the highlight button again after each time they highlight an area?


Yes, just catch the mouseUp event, and then start a new annotation in it.

Let me know if I am not clear enough.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4445
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Turn annotations on and off

Postby rgoodson40 » Sun Feb 05, 2012 9:16 pm

Thanks Loic. The first answer works great. The second is not working.

If I call GdViewer1.AddRectangleHighlighterAnnotInteractive(Color.Red) in the mouse up event after a highlight has been drawn, the highlight disappears and it still doesn't give me the ability to draw another highlight. I also tried capturing the AnnotationAddedByUser event.

Any ideas as to why this isn't working?
rgoodson40
 
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Turn annotations on and off

Postby Loïc » Sun Feb 05, 2012 9:57 pm

Hello again,

Are you using latest version ? / http://www.gdpicture.com/download/downl ... urenet.php

This code works like a charm for me:

Code: Select all
Private Sub GdViewer1_AnnotationAddedByUser(ByVal AnnotationIdx As Integer) Handles GdViewer1.AnnotationAddedByUser
      GdViewer1.AddRectangleHighlighterAnnotInteractive(Color.Red)
End Sub


Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4445
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Turn annotations on and off

Postby rgoodson40 » Sun Feb 05, 2012 11:20 pm

works great now. not sure what was different, but its working now.

Thanks.
rgoodson40
 
Posts: 32
Joined: Sun Jan 30, 2011 8:40 pm

Re: Turn annotations on and off

Postby Loïc » Sun Feb 05, 2012 11:59 pm

OK perfect! Thank you for the return.

Cheers,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4445
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture XMP Annotations Plugin

Who is online

Users browsing this forum: No registered users and 1 guest

cron