List of Commands

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
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

List of Commands

Post by jeffp »

I'm looking to hide some of your menu items and I'm using the following

ACmd := INST_UIX.CmdManager.Cmd[INST_PXV.Str2ID(AName, False)];
ACmd.Hidden := AHidden;


I looked for a comprehensive list of all the cmd string values but couldn't find it. Could you point me there.
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: List of Commands

Post by Sasha - Tracker Dev Team »

Hello Jeff,

Please check the FullDemo application - there is a tab with a list of commands - you can check the code that generates it.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: List of Commands

Post by jeffp »

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

Re: List of Commands

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: List of Commands

Post by jeffp »

I've found the list of commands in the FullDemo and can hide individual menu items just fine using the code below.

However, I can't see to hide an entire toolbar. For example, how do I hide

cmd.view.toolbar.contentEditing
cmd.view.toolbar.form

Code: Select all

procedure TMyPDFControl.SetCommandState(AName: String; AHidden: Boolean);
var
  ACmd: IUIX_Cmd;
begin
  try
    ACmd := INST_UIX.CmdManager.Cmd[INST_PXV.Str2ID(AName, False)];
    ACmd.Hidden := AHidden;
  except end;
end;
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: List of Commands

Post by Sasha - Tracker Dev Team »

Hello Jeff,

Your code will hide the command that is toggling the Command Bar visibility state, not the Command Bar itself. To show or hide the Command Bar, check the FullDemo application for the ShowCmdBar method. It uses the command bars' IDs defined in the public enum IDS.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: List of Commands

Post by jeffp »

I see that in the full demo, but where do I get the proper Ids to make the calls. The neither of the calls in the code below work.

The calls in the full demo reference an emun of values IDS.

Also, can I hide a CommandBar right after initialization or does it have to be hidden after a document gets opened?

Code: Select all

AName := 'cmd.view.toolbar.contentEditing';
  FControl.Inst.ShowCmdBar(AName, False);
  FControl.Inst.ShowCmdBar2(INST_PXV.Str2ID(AName, False), False);
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: List of Commands

Post by Sasha - Tracker Dev Team »

Hello Jeff,

Check this out in the FullDemo:

Code: Select all

	public enum IDS
	{
		// cmdbars
		cmdbar_menubar,
		cmdbar_standard,
		cmdbar_file,
		cmdbar_rotateView,
		cmdbar_zoom,
		cmdbar_pageNav,
		cmdbar_contentEditing,
		cmdbar_pageLayout,
		cmdbar_docOptions,
		cmdbar_commenting,
		cmdbar_measurement,
		cmdbar_properties,
		cmdbar_launchApp,
		cmdbar_addon,
About the AName := 'cmd.view.toolbar.contentEditing'; check my previous post:
Sasha - Tracker Dev Team wrote:Your code will hide the command that is toggling the Command Bar visibility state, not the Command Bar itself.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply