Can't Hide Identify Forms menu item

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

Can't Hide Identify Forms menu item

Post by jeffp »

I'm using the following Delphi function to successfully hide a number of you menu items.

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)];
    if Assigned(ACmd) then
    begin
      ACmd.Hidden := AHidden;
    end;
  except
  end;
end;
For example,

Code: Select all

SetCommandState('cmd.forms.manageData', True); 
works just fine.

However, I can't seem to hide

Code: Select all

SetCommandState('cmd.identifyForms', True);
I know it's a new feature but it doesn't seem to hide like the others. I think I got the ID right.

--Jeff
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Can't Hide Identify Forms menu item

Post by TrackerSupp-Daniel »

Hello, jeffp

Did you mean to post this in one of the SDK forums? I am afraid that this goes beyond what I know to help with, but I can move the post to the appropriate forum for you and get the attention of a developer.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Hide Identify Forms menu item

Post by jeffp »

Oh, sorry. Yes, should be in the SDK forum. Can you move it there for me.

--Jeff
jeffp
User
Posts: 914
Joined: Wed Sep 30, 2009 6:53 pm

Re: Can't Hide Identify Forms menu item

Post by jeffp »

Any thoughts on this one?
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: Can't Hide Identify Forms menu item

Post by Vasyl-Tracker Dev Team »

Hi Jeff.

I just checked it in our FullDemo app, and seems it works properly for me:

Code: Select all

...

PDFXEdit.PXV_Inst Inst = new PDFXEdit.PXV_Inst();
Inst.Init(...);
...
// load plugins
Inst.StartLoadingPlugins();
Inst.AddPluginFromFile("<...>\\Plugins.x64\\IdentifyForms.pvp"); // "cmd.identifyForms" command is from IdentifyForms-plugin
...
Inst.FinishLoadingPlugins();
Inst = nullptr;

...

InitComponents(); // here the pdf-control is created, and you need to call it AFTER the loading of Editor plugins, 
                  // otherwise commands from plugins will not be added to toolbars

...

int cmdID = pdfCtl.Inst.Str2ID("cmd.identifyForms");
IUIX_Cmd cmd = uiInst.CmdManager.Cmd[cmdID];
if (cmd != null)
	cmd.Hidden = true;
HTH
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.