e_formFields_changed event not called until field loses focus

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

e_formFields_changed event not called until field loses focus

Post by coblejesse »

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.
Sasha - Tracker Dev Team
User
Posts: 5522
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 »

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
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Post Reply