Event Source in split mode

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

Event Source in split mode

Post by AnMuWK »

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?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team »

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: 30
Joined: Thu Dec 19, 2019 2:20 pm

Re: Event Source in split mode

Post by AnMuWK »

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.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team »

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: 30
Joined: Thu Dec 19, 2019 2:20 pm

Re: Event Source in split mode

Post by AnMuWK »

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.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team »

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: 30
Joined: Thu Dec 19, 2019 2:20 pm

Re: Event Source in split mode

Post by AnMuWK »

Yes, the objects are same
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: Event Source in split mode

Post by zarkogajic »

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
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Event Source in split mode

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Thanks for the assistance here :)

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