prevent drop in bookmarksview

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
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

prevent drop in bookmarksview

Post by jusWest »

Hello!

Could not find an answer searching for this.

We want to disable the possibility to drag an external doc/pdf into the bookmarks panel.

we have set allowdrop to false for the editorcontrol, but that does not prevent dropping files
into the bookmarksview.

Any way to achive this?

/Ronny
zarkogajic
User
Posts: 1370
Joined: Thu Sep 05, 2019 12:35 pm

Re: prevent drop in bookmarksview

Post by zarkogajic »

Hi Ronny,

Wild (not tested) guess: remove UIX_ObjStyleEx_DropTarget from BookmarksView IUIX_Obj.

TheDoc.BookmarksView.Obj.SetStyleEx(0, UIX_ObjStyleEx_DropTarget)

p.s.
Maybe this will disable re-arranging bookmars using drag-drop as well.

-žarko
jusWest
User
Posts: 150
Joined: Fri Aug 24, 2018 8:26 am

Re: prevent drop in bookmarksview

Post by jusWest »

Thanks, that disables drag/drop, but unfortunately it also disables internal drag/drop :(
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2352
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: prevent drop in bookmarksview

Post by Vasyl-Tracker Dev Team »

Hi jusWest.

You may try the following way (pseudocode):

Code: Select all

IUIX_Tree bookmTree;
bookmPane.Obj.QueryImpl(_GuidOf_(IUIX_Tree), out bookmTree);

IUIX_DropTargetSupport dropSupp = (IUIX_DropTargetSupport)bookmTree; // QueryInterface is used tehnically...

int nDropFmtToKeep = RegisterClipboardFormat("UIX:PrivateCbFmt");

dropSupp.ClearSuppFmtList();
dropSupp.AddSuppFmt(nDropFmtToKeep);
Cheers.
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.
Post Reply