Hi,
I think i put this in the wrong forum before, the end user forum:
I've been searching through your forums trying to find how to hide or at least disable the Save/ Save As menu options from within code and I'm not finding anything for some reason. I'm seeing how to do it for each user from within the Editor but not from within code. Not sure if I'm searching for the wrong keywords. Can you please point me in the right direction.
Thanks,
-Jesse
Hiding/Disabling Save/Save As in code
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.
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.
-
- User
- Posts: 34
- Joined: Thu May 16, 2019 7:44 pm
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hiding/Disabling Save/Save As in code
Hello Jesse,
There is a sample like that in the FullDemo application that comes with the SDK. There is a Commands tab that contains a list of commands - there are buttons to hide and disable them. You can check the code behind them for yourself.
Cheers,
Alex
There is a sample like that in the FullDemo application that comes with the SDK. There is a Commands tab that contains a list of commands - there are buttons to hide and disable them. You can check the code behind them for yourself.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 34
- Joined: Thu May 16, 2019 7:44 pm
Re: Hiding/Disabling Save/Save As in code
Thanks very much Alex! Here is a code sample for anyone looking at this in the future.
public PDFXEdit.IPXS_Inst pxsInst = (PDFXEdit.IUIX_Inst)PDFXEditor.Inst.GetExtension("UIX");
public void TurnOffCmd(string cmd, bool isOff)
{
PDFXEdit.IUIX_Cmd iuixCmd = uiInst.CmdManager.Cmds.Find(cmd);
if (iuixCmd == null)
return;
iuixCmd.Offline = isOff;
}
public PDFXEdit.IPXS_Inst pxsInst = (PDFXEdit.IUIX_Inst)PDFXEditor.Inst.GetExtension("UIX");
public void TurnOffCmd(string cmd, bool isOff)
{
PDFXEdit.IUIX_Cmd iuixCmd = uiInst.CmdManager.Cmds.Find(cmd);
if (iuixCmd == null)
return;
iuixCmd.Offline = isOff;
}
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hiding/Disabling Save/Save As in code
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 34
- Joined: Thu May 16, 2019 7:44 pm
Re: Hiding/Disabling Save/Save As in code
Hi,
So after speaking with my boss further, he would rather instead of just disabling the commands, would like to hide them, and then instead of "Save Copy As..." he would like "Export Copy As...". Is there any way to hide the Save commands we don't want, and then change the wording of "Save Copy As..." to "Export Copy As..."?
Thanks,
Jesse
So after speaking with my boss further, he would rather instead of just disabling the commands, would like to hide them, and then instead of "Save Copy As..." he would like "Export Copy As...". Is there any way to hide the Save commands we don't want, and then change the wording of "Save Copy As..." to "Export Copy As..."?
Thanks,
Jesse
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hiding/Disabling Save/Save As in code
Hello Jesse,
There are properties that you require described here:
https://sdkhelp.pdf-xchange.com/view/PXV:IUIX_Cmd
Cheers,
Alex
There are properties that you require described here:
https://sdkhelp.pdf-xchange.com/view/PXV:IUIX_Cmd
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 34
- Joined: Thu May 16, 2019 7:44 pm
Re: Hiding/Disabling Save/Save As in code
Thanks Alex, but can you please show an example on how to use these properties in c# or even vb? Once I see an example things always become a lot clearer.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Hiding/Disabling Save/Save As in code
Hello Jesse,
Looks like you have used the Offline property - all of them are documented for this interface.
Cheers,
Alex
Looks like you have used the Offline property - all of them are documented for this interface.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ