context menu does not work  SOLVED

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
AteBe
User
Posts: 63
Joined: Thu Dec 06, 2018 7:02 am

context menu does not work

Post by AteBe »

I do not get the context menu for the toolbar with either the right-click mouse operation nor the context menu button.
The context menu in the document itself works.
In addition, the editor does not respond to the F-keys.
How can I activate these functionalities?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: context menu does not work

Post by Sasha - Tracker Dev Team »

Hello AteBe,

What context menu are you talking about exactly?
To enable the shortcuts, you will have to set this property:

Code: Select all

pdfCtl.AllowedShortcuts = true;
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
AteBe
User
Posts: 63
Joined: Thu Dec 06, 2018 7:02 am

Re: context menu does not work

Post by AteBe »

Hello Alex,

the shortcuts work, but the F-keys (for example, F9 = Show / Hide Menu) still do not work.

The context menu that I do not get is the following
ContextMenu.PNG
AteBe
AteBe
User
Posts: 63
Joined: Thu Dec 06, 2018 7:02 am

Re: context menu does not work

Post by AteBe »

Hallo Alex,

I think the command for the context menu might be cmd.view.lockUnlockAllCmdBars
However, I do not know the correct calling syntax.

For the F-keys I still do not have a solution.

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

Re: context menu does not work

Post by Sasha - Tracker Dev Team »

Hello AteBe,

Please see the FullDemo application and see the "Unlock Command Bars" checkbox (from the View tab) implementation.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
AteBe
User
Posts: 63
Joined: Thu Dec 06, 2018 7:02 am

Re: context menu does not work

Post by AteBe »

Because we do use JAVA and not use C# I just downloaded the code files.
Therefore I have no running FullDemo application .

But I've looked at the code and if I understand it correctly, the switch over an event, which is triggered by a checkbox.
I want to unlock the toolbar right at the start.

I tried the following code, which unfortunately does not work.

Code: Select all

	iControlSite = new OleControlSiteEx(frame, SWT.NONE, "PDFXEdit.PXV_Control.1");
	iControlSite.doVerb(OLE.OLEIVERB_SHOW);
	iControlSite.doVerb(OLE.OLEIVERB_UIACTIVATE);
	iCtrl = new IPXV_Control(iControlSite.getPointerToUnknown());
	iInst = iCtrl.Inst();

	IUIX_Obj x = iInst.ActiveMainView().MenuBar().Owner();
	iInst.ExecUICmd("cmd.view.lockUnlockAllCmdBars", x);
Do you have any idea why it does not work?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: context menu does not work

Post by Sasha - Tracker Dev Team »

Hello AteBe,

Here's the code snippet from the FullDemo application:

Code: Select all

private void ckUnlockCmdBars_CheckedChanged(object sender, EventArgs e)
{
	if (fUpdateControls != 0) return;

	pdfCtl.LockedCmdBars = !ckUnlockCmdBars.Checked;
}
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
AteBe
User
Posts: 63
Joined: Thu Dec 06, 2018 7:02 am

Re: context menu does not work

Post by AteBe »

Many thanks for the help. The context menu works perfectly now.

Unfortunately, the editor still does not respond to the F-keys (for example, F9 = Show / Hide Menu).

Any idea why it does not work?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: context menu does not work  SOLVED

Post by Sasha - Tracker Dev Team »

Hello AteBe,

For those to work you will have to:
1)

Code: Select all

pdfCtl.VisibleCmdPanes = (uint)PDFXEdit.PXV_VisibleCmdPanes.PXV_VisibleCmdPanes_All;
2) Focus the control itself.

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