Hi Support,
How can I check if "cmd.tool.hand.selTextImages" is on or off ?
I want to programmatically enable it for a document, I can use:
Inst.ExecUICmd('cmd.tool.hand.selTextImages', IPXV_Document.ActiveView.Obj);
However, it seems the setting is not per document but "per instance".
So, executing the above again would disable it (for all documents).
Therefore: question: how to get is it on or off (per document?) ?
-žarko
cmd.tool.hand.selTextImages on or off ? SOLVED
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
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: 1473
- Joined: Thu Sep 05, 2019 12:35 pm
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: cmd.tool.hand.selTextImages on or off ?
Try this:
Code: Select all
bool bHandToolCanSelTextAndImages = Inst.Settings["Tools.Hand.SelTextAndImages"].v;
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1473
- Joined: Thu Sep 05, 2019 12:35 pm
Re: cmd.tool.hand.selTextImages on or off ?
Hi Vasyl,
Thanks, works as expected..
However, after
Inst.Settings['Tools.Hand.SelTextAndImages'].v = FALSE
What Inst.FireAppPrefsChanged(PXV_AppPrefsChanges) should be called so that corresponding command item to that settings gets updated?
I've also tried
InstUI.CmdManager.UpdateCmdItems(UIX_CmdItemUpdate_State, InstUI.CmdManager.Cmds.Find('cmd.tool.hand.selTextImages').ID);
But the command item only gets updated after the document (/MainFrame?) gets activated ..
p.s.
Not a show stopper ofc...
-ž
Thanks, works as expected..
However, after
Inst.Settings['Tools.Hand.SelTextAndImages'].v = FALSE
What Inst.FireAppPrefsChanged(PXV_AppPrefsChanges) should be called so that corresponding command item to that settings gets updated?
I've also tried
InstUI.CmdManager.UpdateCmdItems(UIX_CmdItemUpdate_State, InstUI.CmdManager.Cmds.Find('cmd.tool.hand.selTextImages').ID);
But the command item only gets updated after the document (/MainFrame?) gets activated ..
p.s.
Not a show stopper ofc...
-ž
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: cmd.tool.hand.selTextImages on or off ? SOLVED
Try this:
Code: Select all
{
pxvInst.Settings['Tools.Hand.SelTextAndImages'].v = bNewVal;
}
pxvInst.UpdateProps(true, true); // to update the Properties pane forcedly (necessary when Hand tool is active)
uiInst.CmdManager.UpdateCmdItems(UIX_CmdItemUpdate_State, uiInst.Str2ID("cmd.tool.hand.selTextImages"));
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 1473
- Joined: Thu Sep 05, 2019 12:35 pm
Re: cmd.tool.hand.selTextImages on or off ?
Hi Vasyl,
That's it. Thanks.
-žarko
That's it. Thanks.
-žarko
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am