Deselecting

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Deselecting

Post by jeffp »

I'm using op.annots.addNew to add a new annotation. Once it is added the annotation is selected and I have to click into the page with my mouse to deselect it.

I'm looking for a way in code to deselect the annotation after I create it without needing to click into the page.

Also, how do I set the Hint value that appears when I hover over the Annotation?

--Jeff
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17906
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Deselecting

Post by Tracker Supp-Stefan »

Hello Jeff,

If you add the annotation(s) with JS:
https://sdkhelp.pdf-xchange.com/vie ... _ExecuteJS
They should not get selected at all.

Alternatively - try switching the currently selected tool to e.g. the hand one, and then back to what it was - and the selection should also disappear.

As for the "hint" - is this the tooltip you mean? This might differ from one type of annotation object to another - so can you please specify for which type exactly you want to set it and maybe provide a sample?

Cheers,
Stefan
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Deselecting

Post by jeffp »

I tried calling

cmd.tool.hand

But that didn't work. The annotation still stayed selected. It's like you have to click into the page somewhere off the annotation for it to be deselected. Anyway to do this in code?

I'm placing a "square" annotation and the "hint" in referring to is what appears in a small yellow box as I hover over the annotation. The current text in this box is my windows username. Is there a way to customize this "hint"?

--Jeff
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Deselecting

Post by Sasha - Tracker Dev Team »

Hello Jeff,

Try clearing the selection after the operation:
https://sdkhelp.pdf-xchange.com/vie ... _ActiveSel
https://sdkhelp.pdf-xchange.com/vie ... ction_Show

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply