Event Source in split mode

PDF-XChange Editor SDK for Developers

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

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
AnMuWK
User
Posts: 29
Joined: Thu Dec 19, 2019 2:20 pm

Event Source in split mode

Post by AnMuWK » Tue Jun 08, 2021 2:51 pm

Hi,

I have activated the SplitMode (AxPDFXEdit.AxPXV_ControlInst.ExecUICmd("cmd.window.split.vert") and I have subscribed to the OnEvent event.
How can I determine in the OnEvent event whether the event was triggered by the left or right document?

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

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team » Wed Jun 09, 2021 7:55 am

Hello AnMuWK,

What event exactly do you want to catch? There are document based events and Instance based events - the later are not connected to any presice view.

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

AnMuWK
User
Posts: 29
Joined: Thu Dec 19, 2019 2:20 pm

Re: Event Source in split mode

Post by AnMuWK » Wed Jun 09, 2021 9:41 am

Hi Alex,

I want to catch the currentPageChanged ("e.pagesView.currentPageChanged") event. When the document is in split mode, I am missing the information from which of the two documents the event was triggered.

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

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team » Wed Jun 09, 2021 10:11 am

Hello AnMuWK,

The pFrom parameter in the OnEvent method should hold the IPXV_View (PagesView) from which you can get to the IPXV_DocumentView parent.

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

AnMuWK
User
Posts: 29
Joined: Thu Dec 19, 2019 2:20 pm

Re: Event Source in split mode

Post by AnMuWK » Thu Jun 10, 2021 6:30 am

Hi Alex,

that's right, the pFrom parameter holds the IPXV_View (PagesView) object. But no matter if I turn the page for example in the left or in the right document, all properties in the IPXV_View object remain the same and I have no chance to find out from which document the event has been thrown.

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

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team » Thu Jun 10, 2021 7:53 am

Hello AnMuWK,

You mean that the objects (pointers) are the same for both of the split views?

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

AnMuWK
User
Posts: 29
Joined: Thu Dec 19, 2019 2:20 pm

Re: Event Source in split mode

Post by AnMuWK » Thu Jun 10, 2021 8:32 am

Yes, the objects are same

zarkogajic
User
Posts: 1034
Joined: Thu Sep 05, 2019 12:35 pm

Re: Event Source in split mode

Post by zarkogajic » Fri Jun 11, 2021 8:10 am

Hi AnMuWK,

I've tested this for curiosity...

When e.pagesView.currentPageChanged is fired, the pFrom is IPXV_PagesView and if you have a document in split view - the pFrom *will be different* - depending on in what PagesView the page position changed.

Yes, the IPXV_PagesView's.DocView would be the same as you have one IPXV_DocumentView.

To get the current page, of the PagesView that raised the event, use IPXV_PagesView's.Layout.CurrentPage.


-žarko

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

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team » Fri Jun 11, 2021 1:07 pm

Hello zarkogajic,

Thanks for the assistance here :)

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

Post Reply