Page 1 of 1

context menu does not work

Posted: Thu Jan 24, 2019 7:45 am
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?

Re: context menu does not work

Posted: Thu Jan 24, 2019 7:57 am
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

Re: context menu does not work

Posted: Thu Jan 24, 2019 8:35 am
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

Re: context menu does not work

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

Re: context menu does not work

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

Re: context menu does not work

Posted: Thu Jan 24, 2019 10:28 am
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?

Re: context menu does not work

Posted: Thu Jan 24, 2019 11:00 am
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

Re: context menu does not work

Posted: Thu Jan 24, 2019 11:31 am
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?

Re: context menu does not work  SOLVED

Posted: Thu Jan 24, 2019 12:26 pm
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