issue with e.document.fieldFocusChanged  SOLVED

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
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

issue with e.document.fieldFocusChanged

Post by prime clinical systems »

Gentlemen, please allow this event to fire in edit mode, and not just regular mode with tool.hand active, please let it fire with tool.EditField active as well. The reason is, I need to be able to read the ffield.mappedname property, and this event returns the form field selected in param1, so I always know I have the correct field.

Otherwise, show me how to get the current selected field, with the e.docSelection.changed event, but doc_selection event does not seem to be able to expose the annotation.
The documentation states the param1 returns the ClusterID and trying to use that with
Dim DocSel As IPXV_DocSelection
set DocSel = doc.getselcluster(pevent.param1) does not work

Please help, thanks
ce
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: issue with e.document.fieldFocusChanged

Post by Sasha - Tracker Dev Team »

Hello Clifford,

There is a correct way of doing what you need without adding anything. In the e.docSelection.changed use the https://sdkhelp.pdf-xchange.com/vie ... _ActiveSel method. This will give you the current selection. Then try casting it to the IPXV_AnnotSelection because you are selecting a Form Field's Widget not a form field itself. Then get the annotation from the IPXV_AnnotSelection and check it's https://sdkhelp.pdf-xchange.com/vie ... tion_Field property. Then you will have the IPXC_Field you need.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
prime clinical systems
User
Posts: 211
Joined: Sun Aug 05, 2012 5:20 pm

Re: issue with e.document.fieldFocusChanged  SOLVED

Post by prime clinical systems »

Well I had tried casting that to nearly everything in the book, but no luck, anyway, found this and it works:
Set Annot = Me.PDF.Doc.ActiveView.PagesView.GetAnnotFromPt(stPoint)
Set FFieldSel = Annot.Field

But anyway, the focus obviously changes, and not to fire the event when edit active I really think is a missing feature, anyway, thanks
ce
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: issue with e.document.fieldFocusChanged

Post by Sasha - Tracker Dev Team »

:)
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply