Getting aware of the selection of an annotation

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

anti_g
User
Posts: 22
Joined: Thu Apr 02, 2009 9:55 am

Getting aware of the selection of an annotation

Post by anti_g »

Hi guys,

first of all, congratulations to your long awaited new build, even if it lets some of the issues open. :wink:

Now my question, is it possible to get some event when the user clicks on an annotation (highlight or stickernote doesn't matter) and the annotation gets that dashed line around it?
I want to enable/disable some menu items depending on that selection.

Thanks,
Anton.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Getting aware of the selection of an annotation

Post by Corwin - Tracker Sup »

Hello Anton.
No we don’t have such events, but we will try to add this in near future (maybe in next few builds).
DSSavant
User
Posts: 216
Joined: Thu Jul 08, 2004 7:29 pm

Re: Getting aware of the selection of an annotation

Post by DSSavant »

Just wanted to see what the progress/status of this feature might be. I'm logging all OnEvent(...) information in my test application and do not see any notifications when an annotation is selected. I too need to configure context menus/toolbars accordingly. If this could be in V3.0, that would be great.

Just FYI, I do have full mouse logging turned on.
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Getting aware of the selection of an annotation

Post by Vasyl - PDF-XChange »

Hi, guys.
Now my question, is it possible to get some event when the user clicks on an annotation (highlight or stickernote doesn't matter) and the annotation gets that dashed line around it?
I want to enable/disable some menu items depending on that selection.
Unfortunately, but no there is no easy way for this in current realization. :(

1. You may turn on selection notifications by:

Code: Select all

SetProperty("Notifications.Selection.Filter", "Annotations",0);
after this you will be able to get the necessary events through IPDFXCviewEvents::OnEvent routine.

2. and use java-script(RunJavaScript function) for details about a selected annotation(or to modify it), such as:

Code: Select all

var annots = this.selectedAnnots;
annots[0].subject; // for example
3. and switch off/on any UI-command:

Code: Select all

SetProperty("Commands["Copy"].State", "offline",0);
SetProperty("Commands["Paste"].State", "offline",0);
SetProperty("Commands["Delete"].State", "offline",0);
HTH
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
DSSavant
User
Posts: 216
Joined: Thu Jul 08, 2004 7:29 pm

Re: Getting aware of the selection of an annotation

Post by DSSavant »

This will help. Thanks.
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Getting aware of the selection of an annotation

Post by John - Tracker Supp »

Pleasure.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com