Page 1 of 1

Event Source in split mode

Posted: Tue Jun 08, 2021 2:51 pm
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?

Re: Event Source in split mode

Posted: Wed Jun 09, 2021 7:55 am
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

Re: Event Source in split mode

Posted: Wed Jun 09, 2021 9:41 am
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.

Re: Event Source in split mode

Posted: Wed Jun 09, 2021 10:11 am
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

Re: Event Source in split mode

Posted: Thu Jun 10, 2021 6:30 am
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.

Re: Event Source in split mode

Posted: Thu Jun 10, 2021 7:53 am
by Sasha - Tracker Dev Team
Hello AnMuWK,

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

Cheers,
Alex

Re: Event Source in split mode

Posted: Thu Jun 10, 2021 8:32 am
by AnMuWK
Yes, the objects are same

Re: Event Source in split mode

Posted: Fri Jun 11, 2021 8:10 am
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

Re: Event Source in split mode

Posted: Fri Jun 11, 2021 1:07 pm
by Sasha - Tracker Dev Team
Hello zarkogajic,

Thanks for the assistance here :)

Cheers,
Alex