context menu does not work  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - 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
AteBe
User
Posts: 63
Joined: Thu Dec 06, 2018 7:02 am

context menu does not work

Post by AteBe » Thu Jan 24, 2019 7:45 am

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?

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

Re: context menu does not work

Post by Sasha - Tracker Dev Team » Thu Jan 24, 2019 7:57 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Thu Jan 24, 2019 8:35 am

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 » Thu Jan 24, 2019 9:07 am

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

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

Re: context menu does not work

Post by Sasha - Tracker Dev Team » Thu Jan 24, 2019 9:56 am

Hello AteBe,

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

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Thu Jan 24, 2019 10:28 am

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?

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

Re: context menu does not work

Post by Sasha - Tracker Dev Team » Thu Jan 24, 2019 11:00 am

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
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 » Thu Jan 24, 2019 11:31 am

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?

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

Re: context menu does not work  SOLVED

Post by Sasha - Tracker Dev Team » Thu Jan 24, 2019 12:26 pm

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
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply