which field has focus

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

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

Post Reply
nirnir
User
Posts: 30
Joined: Wed Aug 25, 2010 10:22 am

which field has focus

Post by nirnir »

HI,

How can I detect which field currently has the focus ?
(I'm using Delphi and javascript)

Nir
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17938
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: which field has focus

Post by Tracker Supp-Stefan »

Hello Nir,

Please check the GetSelectedField method in the Viewer AX SDK manual ;)

Best,
Stefan
nirnir
User
Posts: 30
Joined: Wed Aug 25, 2010 10:22 am

Re: which field has focus

Post by nirnir »

Hi,

I'm trying to use it but get exception () ("OLE error 82130001")
Here is the code .
The other problem is that I need an event when field gets focus , Do you have any Delphi exapmle of how doing that ?

function TMyCoPDFXCview.GetSelectedField:string;
var
vDataIn, vDataOut: OLEVariant;
begin
try
vDataIn :=0;
DoVerb('', 'GetSelectedField', vDataIn, vDataOut, 0) ;
except
end;
result := vDataOut;
end;
User avatar
Vasyl-Tracker Dev Team
Site Admin
Posts: 2353
Joined: Thu Jun 30, 2005 4:11 pm
Location: Canada

Re: which field has focus

Post by Vasyl-Tracker Dev Team »

Hi,

Your code is not quite correct - You have forgotten to specify the document so the correct code would be:

Code: Select all

ctrl.DoDocumentVerb(docId, '', 'GetSelectedField', vDataIn, vDataOut, 0) ;
HTH
Vasyl Yaremyn
Tracker Software Products
Project Developer

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
nirnir
User
Posts: 30
Joined: Wed Aug 25, 2010 10:22 am

Re: which field has focus

Post by nirnir »

Thanks,
But how can I get event on focus change ?
Do you have a Delphi example about events ?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17938
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: which field has focus

Post by Tracker Supp-Stefan »

Hello nirnir,

Please have a look at the Notifications section of the Viewer SDK manual, and in particular section:
2.2.2.10.5 Notifications.Selection

As for an example - I do not think we have any other than the snippets included in the manual, but I hope they would be enough to point you in the right direction.

Best,
Stefan
Post Reply