Page 1 of 1

List of shortcuts?

Posted: Tue Oct 16, 2012 3:28 pm
by Parps
Hi Craig,

I trying to make a basic PDF viewer based on the ActiveX DLL.

For instance I don’t want have the option document properties. Although I customized the tool bars that the option is not available the shortcut (<CTRL>-D) still works. I can switch off the shortcuts using ‘Allow AllAccelerators’ but then all shortcuts don’t work anymore.

Is there a way that I can enable individual short cuts? Or is there a list of used shortcuts somewhere so I can disable that individual command if I don’t want it to be available?

Best regards,
Koen

Re: List of shortcuts?

Posted: Tue Oct 16, 2012 4:34 pm
by Tracker - Clarion Support
Hi Koen!

You can enable or disable any command using the correct class method.

See the PDF-XViewerAx20_CW.pdf manual around page 103 for Set/Get Command State.

We have provided a large number of class methods that begin with SetCmdState.... In addition, #CODE templates that begin with PXCVAXSetCmd... that implement those.

Depending on how much of the viewer functionality you want to allow or deny your users, you can use AllowAllAccelerators to allow all or deny all, followed by using the SetCmdState... methods to turn the specific commands on or off.

Re: List of shortcuts?

Posted: Tue Oct 16, 2012 8:04 pm
by Parps
Hi Craig,

Thank you for your advice. I am not sure if I understand you correctly. Is a SetCmdState... method supposed to enable the keyboard shortcut as well?

For example, if I use AllowAllAccelerators(False) followed by SetCmdStateDocumentProperties(True) the option document properties is available via the menu. But the shortcut isn’t working. Is that expected behaviour or did I miss something?

Best regards,
Koen

Re: List of shortcuts?

Posted: Tue Oct 16, 2012 8:15 pm
by Tracker - Clarion Support
Hi Koen!

If that combination is not working, then I'm not sure what you want can be done.

You're saying that if you leave the shortcuts but turn off the command then the shortcut activates the command anyway?

Re: List of shortcuts?

Posted: Wed Oct 17, 2012 10:11 am
by Parps
Hi Craig,
Tracker - Clarion Support wrote:You're saying that if you leave the shortcuts but turn off the command then the shortcut activates the command anyway?
No, the other way around. I disable all keyboard shortcuts and then activate the command, its shortcut isn’t working.

Cheers,
Koen

Re: List of shortcuts?

Posted: Wed Oct 17, 2012 10:30 am
by Tracker - Clarion Support
Hi Koen!
Parps wrote:Hi Craig,
Tracker - Clarion Support wrote:You're saying that if you leave the shortcuts but turn off the command then the shortcut activates the command anyway?
No, the other way around. I disable all keyboard shortcuts and then activate the command, its shortcut isn’t working.

Cheers,
Koen
I'll pass this up the line to our Project Manager for comment.

Re: List of shortcuts?

Posted: Wed Oct 17, 2012 11:38 am
by Parps
OK, thanks

Re: List of shortcuts?

Posted: Wed Oct 17, 2012 10:01 pm
by Tracker - Clarion Support
Hi Koen!

Here's what I found out:

1. If you AllowAll... set to true then all shortcuts remain active, even if the Menu Bar and Toolbars are turned off.

2. You can use the DenyAll... methods to deny GROUPS of commands. Example: DenyAllPrintOperations will prevent Print from happening. It should disable all the shortcuts associated with these commands.

3. You can use SetCmdState...(False) to turn off a command and disable its shortcut.

HTH!

Re: List of shortcuts?

Posted: Fri Oct 26, 2012 1:59 pm
by Parps
Hi Craig,

Oke, thanks. I guess that will do.

Cheers,
Koen

Re: List of shortcuts?

Posted: Fri Oct 26, 2012 2:08 pm
by Tracker - Clarion Support
Glad to help! :)