prevent rename of bookmark
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.
prevent rename of bookmark
Hello again!
Could not find anything in the forum about this, so I ask here.
Is it possible to prevent the use of F2 and mouseclick that enables the editing of a bookmarks name?
We do not want the users of our application to be able to rename a bookmark.
Regards
Ronny
Could not find anything in the forum about this, so I ask here.
Is it possible to prevent the use of F2 and mouseclick that enables the editing of a bookmarks name?
We do not want the users of our application to be able to rename a bookmark.
Regards
Ronny
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: prevent rename of bookmark
Hello Ronny,
Check out this post:
viewtopic.php?f=66&t=31055&p=124996&hil ... te#p124996
You will have to check whether it's a Set Bookmark's Props operation (there also is a sample on how to get to the operation's data in that link):
https://sdkhelp.pdf-xchange.com/vi ... s_setProps
If it is the needed operation, then you will have to check whether the title modification will take place (mask property):
https://sdkhelp.pdf-xchange.com/vi ... mMaskFlags
And then if bit flags contain the OpModifyBookm_Title flag then break the operation as it's shown in the first link.
Cheers,
Alex
Check out this post:
viewtopic.php?f=66&t=31055&p=124996&hil ... te#p124996
You will have to check whether it's a Set Bookmark's Props operation (there also is a sample on how to get to the operation's data in that link):
https://sdkhelp.pdf-xchange.com/vi ... s_setProps
If it is the needed operation, then you will have to check whether the title modification will take place (mask property):
https://sdkhelp.pdf-xchange.com/vi ... mMaskFlags
And then if bit flags contain the OpModifyBookm_Title flag then break the operation as it's shown in the first link.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: prevent rename of bookmark
Thanks, that worked
another question, is it possible to translate the title of the bookmarks pane, without going throuh the
whole translation process described elsewhere on this site?
This is what I am talking about:
another question, is it possible to translate the title of the bookmarks pane, without going throuh the
whole translation process described elsewhere on this site?
This is what I am talking about:
- Attachments
-
- bmtitle.png (2.01 KiB) Viewed 1871 times
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: prevent rename of bookmark
Hello Ronny,
Well, you can change the window text directly by using this code:
Cheers,
Alex
Well, you can change the window text directly by using this code:
Code: Select all
int nBV = pdfCtl.Inst.Str2ID("bookmarksView");
for (uint i = 0; i < pdfCtl.Inst.ActiveMainView.Panes.Count; i++)
{
PDFXEdit.IPXV_View BV = pdfCtl.Inst.ActiveMainView.Panes[i];
if (BV.ID == nBV)
{
BV.Obj.WndText = "XXX";
break;
}
}
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: prevent rename of bookmark
thanks!
I have implemented the function and it loops trough and matches the id for the bookmarks Pane,
the BV.Obj.WndText gets assigned, but the change never shows in the bookmarkspane.
I use this code:
Is there anything else I must do, must the pane be open?
I have implemented the function and it loops trough and matches the id for the bookmarks Pane,
the BV.Obj.WndText gets assigned, but the change never shows in the bookmarkspane.
I use this code:
Code: Select all
//int nBV = pdfCtl.Inst.Str2ID("bookmarksView");
int nBV = pdfCtl.Doc.View[0].Panes.Active[pdfCtl.Inst.Str2ID("bookmarksView")].ID;
//for (uint i = 0; i < pdfCtl.Inst.ActiveMainView.Panes.Count; i++)
for (uint i = 0; i < pdfCtl.Doc.View[0].Panes.Count; i++)
{
//IPXV_View BV = pdfCtl.Inst.ActiveMainView.Panes[i];
IPXV_View BV = pdfCtl.Doc.View[0].Panes[i];
if (BV != null)
{
if (BV.ID == nBV)
{
BV.Obj.WndText = "XXX";
break;
}
}
}
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: prevent rename of bookmark
Hello Ronny,
Thought that sample is what you need - seems it's not. By investigating a little I remembered the correct code snippet that will surely do what you need:
Cheers,
Alex
Thought that sample is what you need - seems it's not. By investigating a little I remembered the correct code snippet that will surely do what you need:
Code: Select all
IUIX_LayoutItem itm = pdfCtl.Doc.ActiveView.Panes.Layout.GetItem(pdfCtl.Doc.ActiveView.BookmarksView.Obj);
itm.Title = "XXX";
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: prevent rename of bookmark
Great, thank you for all your help. One more question concerning renaming bookmarks.
It it possible to prevent the user from entering EDIT mode on the bookmark? The solution earlier in this thread prevents
it from changing, but not from entering edit mode. It is not a big concern, but it would be nice to prevent that too
Regards
Ronny
It it possible to prevent the user from entering EDIT mode on the bookmark? The solution earlier in this thread prevents
it from changing, but not from entering edit mode. It is not a big concern, but it would be nice to prevent that too
Regards
Ronny
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: prevent rename of bookmark
Hello Ronny,
There is a way on how to restrict this, but this also will restrict any bookmark editing operations. You can set this setting to the document (note that this is a Core Document that you will have to get from the IPXV_Document):
Cheers,
Alex
There is a way on how to restrict this, but this also will restrict any bookmark editing operations. You can set this setting to the document (note that this is a Core Document that you will have to get from the IPXV_Document):
Code: Select all
IPXC_Document::SetOperationRestriction(Perm_ObjBookmark, Perm_OperModify, VARIANT_TRUE);
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: prevent rename of bookmark
great, thank you
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: prevent rename of bookmark
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ