Tried this, still doesn't work:
procedure SetFocused(const AFieldName: WideString);
core := FPDFEdit.Doc.CoreDoc;
if core.HasAcroForm then
acro := core.AcroForm;
fld := acro.GetFieldByName(PChar(AFieldName));
annot := fld.Widget;
id := FPDFEdit.Inst.Str2ID('e.document.fieldFocusChanged',False);
event := FPDFEdit.Doc.EventServer.CreateNewEvent(id,LongWord(annot),0);
I couldn't find any examples nor documentation on how to... cast(?) the ipxc_annotation(widget) for param1. Can you please provide an example of the proper way to do this?
One of the things that I noticed in the interface is that the IPXV_TextEditor give access to an IUIX_Edit, which in turn inherits from IUIX_ObjImpl, which has an Obj property that provides access to the SetInputFocus method. Problem is, I don't know how to connect to an IPXC_FormField's IUIX_Edit object, without accessing the IPXV_TextEditor via the ActiveTextEditor. Of course the ActiveTextEditor is read only - as it should be, I guess - but that means that I can't SET the ActiveTextEditor, nor have I been able to find a way to get access to an IPXC_FormField's IUIX_Edit interface.