e_formFields_changed event not called until field loses focus

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Paul - Tracker Supp, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

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
coblejesse
User
Posts: 30
Joined: Thu May 16, 2019 7:44 pm

e_formFields_changed event not called until field loses focus

Post by coblejesse » Tue Jun 04, 2019 4:47 pm

Hi Alex,

The e_formFields_changed event is not getting called until the field loses focus. Is there a way to have this or another event called right when the field is being changed instead of on the lost focus?

Also, when user adds an image to the image field, the e_formFields_changed event never gets fired at all. Thanks for all your help.

User avatar
Sasha - Tracker Dev Team
User
Posts: 4220
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: e_formFields_changed event not called until field loses focus

Post by Sasha - Tracker Dev Team » Wed Jun 05, 2019 9:15 am

Hello Jesse,

From what I see, adding the image to field calls the op_annot_setData operation that has the field's Widget as an input. You can catch the before or after operation execute event and see whether it's an operation that I mentioned and then see whether the input is a widget. If so, then it means that the field was changed somehow.

As for the field modification only after the focus lost - well it's done like that so that there won't be a multiple operations call when typing something into the fields. Alternatively, you can set the Readonly property for fields to prohibit the edit at all.

Cheers,
Alex
Join us at Google+:
https://plus.google.com/+PDFXChangeEditorTS
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ

Post Reply