Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Actions
PDFANNOTATION_OnLostFocus

See Also Example
Collapse All

This property gets or sets an action to be performed when the PDF control loses the input focus.

Syntax

LONG PDFANNOTATION_OnLostFocus { get; set; }
Value
Index of the action

Remarks

The index of the action can be retrieved from any action creating function such as CreateJavaScriptAction.

Equivalent in new interface: IPDFDocument4::OnControlLostFocus.

Example

OnSetFocus/OnLostFocus Example

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;

a1 := PDF.CreateJavascriptAction('app.alert(''Focus set.'')');
a2 := PDF.CreateJavascriptAction('app.alert(''Focus lost.'')');

PDF.PDFPAGE_CreateControl_Edit('edit1', 10, 10, 60, 24);
PDF.PDFANNOTATION_Text := 'Edit1';
PDF.PDFPAGE_CreateControl_Edit('edit2', 70, 10, 120, 24);
PDF.PDFANNOTATION_Text := 'Edit2';
PDF.PDFANNOTATION_OnSetFocus := a1;
PDF.PDFANNOTATION_OnLostFocus := a2;

PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();

a1 = PDF->CreateJavascriptAction("app.alert('Focus set.')");
a2 = PDF->CreateJavascriptAction("app.alert('Focus lost.')");

PDF->PDFPAGE_CreateControl_Edit("edit1", 10, 10, 60, 24);
PDF->PDFANNOTATION_Text = "Edit1";
PDF->PDFPAGE_CreateControl_Edit("edit2", 70, 10, 120, 24);
PDF->PDFANNOTATION_Text = "Edit2";
PDF->PDFANNOTATION_OnSetFocus = a1;
PDF->PDFANNOTATION_OnLostFocus = a2;

PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();

a1 = PDF.CreateJavascriptAction("app.alert('Focus set.')");
a2 = PDF.CreateJavascriptAction("app.alert('Focus lost.')");

PDF.PDFPAGE_CreateControl_Edit("edit1", 10, 10, 60, 24);
PDF.PDFANNOTATION_Text = "Edit1";
PDF.PDFPAGE_CreateControl_Edit("edit2", 70, 10, 120, 24);
PDF.PDFANNOTATION_Text = "Edit2";
PDF.PDFANNOTATION_OnSetFocus = a1;
PDF.PDFANNOTATION_OnLostFocus = a2;

PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc

a1 = PDF.CreateJavascriptAction("app.alert('Focus set.')")
a2 = PDF.CreateJavascriptAction("app.alert('Focus lost.')")

PDF.PDFPAGE_CreateControl_Edit "edit1", 10, 10, 60, 24
PDF.PDFANNOTATION_Text = "Edit1"
PDF.PDFPAGE_CreateControl_Edit "edit2", 70, 10, 120, 24
PDF.PDFANNOTATION_Text = "Edit2"
PDF.PDFANNOTATION_OnSetFocus = a1
PDF.PDFANNOTATION_OnLostFocus = a2

PDF.EndDoc

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots