Remove command from toolbar  SOLVED

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
User avatar
MartinCS
User
Posts: 153
Joined: Thu Apr 07, 2011 10:01 am
Contact:

Remove command from toolbar

Post by MartinCS »

Hi Tracker-Team,

using SDK version 6.0.322.7 I'm trying to remove the "Exclusive Mode" button from the toolbar bar using this code:

Code: Select all

var cmdId = pdfCtl.Inst.Str2ID("cmd.tool.exclusiveMode", true);
UiInst.CmdManager.Cmds.Delete2(cmdId);
Unfortunally, I'm receiving an error:

Error [UIXLib]: Can't delete the standard command.

Is there a way to remove/hide the exclusive mode from the toolbar?

Thank you!


// Martin
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Remove command from toolbar

Post by Sasha - Tracker Dev Team »

Hello Martin,

Get the IUIX_Cmd by it's ID and set it to Hidden.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
User avatar
MartinCS
User
Posts: 153
Joined: Thu Apr 07, 2011 10:01 am
Contact:

Re: Remove command from toolbar  SOLVED

Post by MartinCS »

Hi Alex,

thank you for your quick reply! The below code worked like a charm:

Code: Select all

var cmd = UiInst.CmdManager.Cmds.Find("cmd.tool.exclusiveMode");
if (cmd != null)
{
	cmd.Hidden = true;
}
// Martin
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Remove command from toolbar

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply