PDFANNOTATION_OnMouseEnter
IPDFDocument3 :: Actions

See Also Example
Collapse All

This property gets or sets an action to be performed when the cursor enters a PDF control's active area.

Syntax

LONG PDFANNOTATION_OnMouseEnter { 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::OnControlMouseEnter.

Example

OnMouseEnter/OnMouseExit Example

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

a1 := PDF.CreateJavascriptAction('app.alert(''Mouse enter.'')');
a2 := PDF.CreateJavascriptAction('app.alert(''Mouse exit.'')');

PDF.PDFPAGE_CreateControl_Edit('edit1', 10, 10, 60, 24);
PDF.PDFANNOTATION_Text := 'Edit1';
PDF.PDFANNOTATION_OnMouseEnter := a1;
PDF.PDFANNOTATION_OnMouseExit := a2;

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

LONG a1 = PDF->CreateJavascriptAction("app.alert('Mouse enter.')");
LONG a2 = PDF->CreateJavascriptAction("app.alert('Mouse exit.')");

PDF->PDFPAGE_CreateControl_Edit("edit1", 10, 10, 60, 24);
PDF->PDFANNOTATION_Text = "Edit1";
PDF->PDFANNOTATION_OnMouseEnter = a1;
PDF->PDFANNOTATION_OnMouseExit = a2;

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

long a1 = PDF.CreateJavascriptAction("app.alert('Mouse enter.')");
long a2 = PDF.CreateJavascriptAction("app.alert('Mouse exit.')");

PDF.PDFPAGE_CreateControl_Edit("edit1", 10, 10, 60, 24);
PDF.PDFANNOTATION_Text = "Edit1";
PDF.PDFANNOTATION_OnMouseEnter = a1;
PDF.PDFANNOTATION_OnMouseExit = a2;

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

a1 = PDF.CreateJavascriptAction("app.alert('Mouse enter.')")
a2 = PDF.CreateJavascriptAction("app.alert('Mouse exit.')")

PDF.PDFPAGE_CreateControl_Edit "edit1", 10, 10, 60, 24
PDF.PDFANNOTATION_Text = "Edit1"
PDF.PDFANNOTATION_OnMouseEnter = a1
PDF.PDFANNOTATION_OnMouseExit = a2

PDF.EndDoc

See Also

Reference