Listen to e.beforeShowContextMenu event

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
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Listen to e.beforeShowContextMenu event

Post by docu-track99 »

Hi Support,
I'm trying to list to the e.beforeShowContextMenu event but there's no event being fired when I did a right click on the previewer. Please let me know what am I doing wrong.

[img]https://drive.google.com/file/d/1GEX16E ... sp=sharing[/img]
[attachment=0]beforeshow.JPG[/attachment]



[code]

Private Sub PdfCtrl_OnEvent(ByVal sender As Object, ByVal e As AxPDFXEdit._IPXV_ControlEvents_OnEventEvent) Handles pdfCtrl.OnEvent
Try

Select Case e.nEventID

Case pdfCtrl.Inst.Str2ID("e.beforeShowContextMenu")
Dim evt As PDFXEdit.IPXV_BeforeShowContextMenuEvent = DirectCast(e.pEvent, PDFXEdit.IPXV_BeforeShowContextMenuEvent)
Dim id = pdfCtrl.Inst.Str2ID("menu.pagesView", False)
If evt.MenuID = id Then

End If
Case pdfCtrl.Inst.Str2ID("e.activeDocChanged")

mWriteLog(15, "PdfCtrl_OnEvent(): Catching event e.activeDocChanged")


[/code]
Attachments
beforeshow.JPG
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Listen to e.beforeShowContextMenu event

Post by Sasha - Tracker Dev Team »

Hello docu-track99,

Are you able to catch it at all or it's not being fired in any of cases?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Listen to e.beforeShowContextMenu event

Post by docu-track99 »

It not being fired. I'm not sure if it's a bug or I'm not catching it on the right method.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Listen to e.beforeShowContextMenu event

Post by Sasha - Tracker Dev Team »

Hello docu-track99,

Have you registered it for listening how it's being done in the FullDemo application with the IDS enum?

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Listen to e.beforeShowContextMenu event

Post by docu-track99 »

There is no sample code for beforeShowContext event on the FullDemo application. Please see the attachment.
Attachments
tracker_fulldemo_noBeforeShowContextMenu.PNG
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Listen to e.beforeShowContextMenu event

Post by Sasha - Tracker Dev Team »

Hello docu-track99,

The event needs to be registered for listening. Look how the IDS enum is being registered and do the same.
image.png
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
docu-track99
User
Posts: 518
Joined: Thu Dec 06, 2007 8:13 pm

Re: Listen to e.beforeShowContextMenu event

Post by docu-track99 »

Thank you.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Listen to e.beforeShowContextMenu event

Post by Sasha - Tracker Dev Team »

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