Remove bookmark highlight box

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
Nyall
User
Posts: 4
Joined: Fri May 25, 2018 3:11 pm

Remove bookmark highlight box

Post by Nyall »

Hello,

As a user scrolls through a document, the bookmarks in the bookmark view are highlighted with a yellow box when their page becomes the current page in the document view. Though, when the current page has no bookmark, the last active bookmark remains highlighted until the next page with a bookmark is hit.

Is there a way to change this behavior so that a bookmark remains highlighted only when it's page is the current page - none would be highlighted if the current page has no bookmarks?

Is there a way this can be done programmatically? I'm already listening for the "e.pagesView.currentPageChanged" event, and have code to tell me whether the current page has any bookmarks or not, but I've been unable to figure out how to remove the yellow box around the last active bookmark.

I've looked into the IPXV_BookmarksView, the IPXC_Bookmarks themselves, the IUIX_Layout and IUIX_LayoutItems for the IPXV_BookmarksView.Obj and it's children, but have come up with nothing. I'm currently looking into whether I can get the IUIX_Tree object that I assume is backing the bookmarks tree, as there looked to be some promising methods on that object.

Any help would be greatly appreciated.

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

Re: Remove bookmark highlight box

Post by Sasha - Tracker Dev Team »

Hello Nyall,

The highlight can be tweaked with the IPXV_DocHighlighter interface. You can add it with the AddNewHighlighter method and remove it with the RemoveHighlighter method. Though in your case, you will have to modify the Bookmark Tree directly and right now, I don't see a way that this can be done easily (the highlight modification part). I will speak to the developer who can tell more and we'll hopefully can figure out something for your case.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Nyall
User
Posts: 4
Joined: Fri May 25, 2018 3:11 pm

Re: Remove bookmark highlight box

Post by Nyall »

Thanks Alex. I'll look into that interface in the meantime.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Remove bookmark highlight box

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Nyall
User
Posts: 4
Joined: Fri May 25, 2018 3:11 pm

Re: Remove bookmark highlight box

Post by Nyall »

Hi Alex,

I've had no luck so far with the IPXV_DocHighlighter interface. I can add a new one and then remove that (as I have a reference to it), but I can't find a way to get access to the instance I assume must already exist for the Bookmarks view.

I've also figured out how to get the IUIX_Tree for the bookmarks:

bmv.Obj.QueryImpl(typeof(IUIX_Tree).GUID, null, out outPtr);
IUIX_Tree tree = (IUIX_Tree)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);

but that's not gotten me any further.

Any luck on your end with a solution, or any leads you may be able to pass along? This is the last issue we're trying to solve before releasing, so I'm looking to resolve this ASAP.

Thanks again for the help.
Nyall
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Remove bookmark highlight box

Post by Sasha - Tracker Dev Team »

Hello Nyall,

This can't be done with the current code available. Some implementation is required from our side - I've wrote to the developer who can tell more about this and once he has time he'll take a look at what can be done here.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Nyall
User
Posts: 4
Joined: Fri May 25, 2018 3:11 pm

Re: Remove bookmark highlight box

Post by Nyall »

I'm a little slow getting back to you, but thank you for investigating. We ended up taking a different approach with the app, so were able to avoid this need.

Thanks again for your help. Cheers.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Remove bookmark highlight box

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply