HI,
How can I detect which field currently has the focus ?
(I'm using Delphi and javascript)
Nir
which field has focus
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
- Tracker Supp-Stefan
- Site Admin
- Posts: 17938
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: which field has focus
Hello Nir,
Please check the GetSelectedField method in the Viewer AX SDK manual
Best,
Stefan
Please check the GetSelectedField method in the Viewer AX SDK manual
Best,
Stefan
Re: which field has focus
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;
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;
- Vasyl-Tracker Dev Team
- Site Admin
- Posts: 2353
- Joined: Thu Jun 30, 2005 4:11 pm
- Location: Canada
Re: which field has focus
Hi,
Your code is not quite correct - You have forgotten to specify the document so the correct code would be:
HTH
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) ;
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.
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.
Re: which field has focus
Thanks,
But how can I get event on focus change ?
Do you have a Delphi example about events ?
But how can I get event on focus change ?
Do you have a Delphi example about events ?
- Tracker Supp-Stefan
- Site Admin
- Posts: 17938
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: which field has focus
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
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