Dragging Bookmark event
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: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Dragging Bookmark event
Hi,
From the Bookmark pane, is there an event I can subscribe to when user drags a bookmark to a new location?
Any help will be appreciated. Thank you.
From the Bookmark pane, is there an event I can subscribe to when user drags a bookmark to a new location?
Any help will be appreciated. Thank you.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Dragging Bookmark event
Hello docu-track99,
The bookmark move operation is being executed at that moment.
Cheers,
Alex
The bookmark move operation is being executed at that moment.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Dragging Bookmark event
Is there any event I can programtically subscribe to like "BeginDrag" / "DragDone"/"AfterDrop" or something?
Any help will be appreciated. Thank you.
Any help will be appreciated. Thank you.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Dragging Bookmark event
Hello docu-track99,
You can listen to the Bookmark's tree callbacks and there is a BeginDrag method there.
This topic should help:
viewtopic.php?f=66&t=33306&p=137281&hil ... ks#p137281
Cheers,
Alex
You can listen to the Bookmark's tree callbacks and there is a BeginDrag method there.
This topic should help:
viewtopic.php?f=66&t=33306&p=137281&hil ... ks#p137281
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Dragging Bookmark event
I'm getting 'The method or operation is not implemented' error from the old callback (see attachment). I created a custom tree callback. I passed in the old callback in the constructor. When I open a pdf with bookmark I'm getting the error. Please let me know if I'm missing something.
Below is the code on how I get the old callback and initialize the custom callback.
Private Sub PdfCtrl_OnEvent(ByVal sender As Object, ByVal e As AxPDFXEdit._IPXV_ControlEvents_OnEventEvent) Handles pdfCtrl.OnEvent
Try
Select Case e.nEventID
Case 2954 'pdfCtrl.Inst.Str2ID("e.beforeshowcontextmenu")
Me.CustomizeContextMenu(e)
Case pdfCtrl.Inst.Str2ID("e.activeDocChanged")
mWriteLog(15, "PdfCtrl_OnEvent(): Catching event e.activeDocChanged")
Dim outPtr As IntPtr
pdfCtrl.Inst.ActiveDocView.BookmarksView.Obj.QueryImpl(GetType(PDFXEdit.IUIX_Tree).GUID, Nothing, outPtr)
Dim tree As PDFXEdit.IUIX_Tree = CType(System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr), PDFXEdit.IUIX_Tree)
Dim clbk As IUIX_TreeCallbacks = tree.Callbacks
myCustomTreeCallback = New CustomSearchTreeCallback(clbk)
tree.Callbacks = myCustomTreeCallback
Below is the code on how I get the old callback and initialize the custom callback.
Private Sub PdfCtrl_OnEvent(ByVal sender As Object, ByVal e As AxPDFXEdit._IPXV_ControlEvents_OnEventEvent) Handles pdfCtrl.OnEvent
Try
Select Case e.nEventID
Case 2954 'pdfCtrl.Inst.Str2ID("e.beforeshowcontextmenu")
Me.CustomizeContextMenu(e)
Case pdfCtrl.Inst.Str2ID("e.activeDocChanged")
mWriteLog(15, "PdfCtrl_OnEvent(): Catching event e.activeDocChanged")
Dim outPtr As IntPtr
pdfCtrl.Inst.ActiveDocView.BookmarksView.Obj.QueryImpl(GetType(PDFXEdit.IUIX_Tree).GUID, Nothing, outPtr)
Dim tree As PDFXEdit.IUIX_Tree = CType(System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr), PDFXEdit.IUIX_Tree)
Dim clbk As IUIX_TreeCallbacks = tree.Callbacks
myCustomTreeCallback = New CustomSearchTreeCallback(clbk)
tree.Callbacks = myCustomTreeCallback
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Dragging Bookmark event
Hello docu-track99,
By default we return the E_NOTIMPL HRESULT for the tree and list callback methods - you should use the try/catch section if you are using .Net
Cheers,
Alex
By default we return the E_NOTIMPL HRESULT for the tree and list callback methods - you should use the try/catch section if you are using .Net
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
-
- User
- Posts: 518
- Joined: Thu Dec 06, 2007 8:13 pm
Re: Dragging Bookmark event
Hi Alex,
I don't get the error when I added the try/catch but the bookmarks are not loading. See attachment.
I don't get the error when I added the try/catch but the bookmarks are not loading. See attachment.
Last edited by docu-track99 on Fri Sep 04, 2020 1:24 pm, edited 1 time in total.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Dragging Bookmark event
Hello docu-track99,
You will need to return the exact same HRESULT as the OldCallbacks did (not sure how it's done in .Net), because right now you are returning S_OK for every method.
Cheers,
Alex
You will need to return the exact same HRESULT as the OldCallbacks did (not sure how it's done in .Net), because right now you are returning S_OK for every method.
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ