Group and Ungroup a collection of annotations

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.
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Group and Ungroup a collection of annotations

Post by lidds »

I was wondering if there is a way that I can Group a selection of annotations together, and allowing the following:

Example:

There are 3 annotation lines.
Select all 3 lines
Right click and select group
When selecting any of the 3 annotation lines it selects all 3

And therefore:

1. Displayed as one element in the comment pane as a group instead of 3 individual lines.
2. All 3 lines move together.
3. Ability to also Ungroup.

I could not see this feature in the FullDemo, and understand that it might not be out the box, but if you have any thoughts on how to achieve this.

Thanks

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

Re: Group and Ungroup a collection of annotations

Post by Sasha - Tracker Dev Team »

Hello Simon,

1) You cannot display them as 1 element at all - as this requires full rewriting of the pane's logic.
2) Theoretically, you can make something like groups in your application, by storing the IPXC_AnnotsList with annotations that are in the group. Then, when selecting the annotation, you can check, whether the annotation is in that group and select the rest of them. For this you should listen to the e.docSelection.changed event and act correspondingly. The same event will occur, when selecting in the Comments Pane.
3) To ungroup the elements, simply remove the needed IPXC_AnnotsList.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
lidds
User
Posts: 510
Joined: Sat May 16, 2009 1:55 pm

Re: Group and Ungroup a collection of annotations

Post by lidds »

Thanks Alex,

Appreciated as always.

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

Re: Group and Ungroup a collection of annotations

Post by Sasha - Tracker Dev Team »

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