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.
Annotations
Collapse All

This property gets or sets an action to be performed when the mouse button is pressed inside the PDF control's active area.

Syntax

LONG OnControlMouseDown { get; set; }
Value
Number of the action

Remarks

he number of the action can be retrieved from any action-creating method, such as CreateJavaScriptAction.

Example

Handling OnAnnotMouseDown and OnAnnotMouseUp

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
a1 := PDF.CreateJavascriptAction('app.alert("Button down.")');
a2 := PDF.CreateJavascriptAction('app.alert("Button up.")');

PDF.AddButton(10, 10, 60, 24, 'cntrl1');
PDF.AnnotUnicodeCaption := 'Button 1';
PDF.OnControlMouseDown := a1;
PDF.AddButton(70, 10, 120, 24, 'cntrl2');
PDF.AnnotUnicodeCaption := 'Button 2';
PDF.OnControlMouseUp := a2;

PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long a1 = PDF->CreateJavascriptAction("app.alert('Button down.')");
long a2 = PDF->CreateJavascriptAction("app.alert('Button up.')");

PDF->AddButton(10, 10, 60, 24, "cntrl1");
PDF->AnnotUnicodeCaption = L"Button 1";
PDF->OnControlMouseDown = a1;
PDF->AddButton(70, 10, 120, 24, "cntrl2");
PDF->AnnotUnicodeCaption = L"Button 2";
PDF->OnControlMouseUp = a2;

PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long a1 = PDF.CreateJavascriptAction("app.alert('Button down.')");
long a2 = PDF.CreateJavascriptAction("app.alert('Button up.')");

PDF.AddButton(10, 10, 60, 24, "cntrl1");
PDF.AnnotUnicodeCaption = "Button 1";
PDF.OnControlMouseDown = a1;
PDF.AddButton(70, 10, 120, 24, "cntrl2");
PDF.AnnotUnicodeCaption = "Button 2";
PDF.OnControlMouseUp = a2;

PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
a1 = PDF.CreateJavascriptAction("app.alert('Button down.')")
a2 = PDF.CreateJavascriptAction("app.alert('Button up.')")

PDF.AddButton 10, 10, 60, 24, "cntrl1"
PDF.AnnotUnicodeCaption = "Button 1"
PDF.OnControlMouseDown = a1
PDF.AddButton 70, 10, 120, 24, "cntrl2"
PDF.AnnotUnicodeCaption = "Button 2"
PDF.OnControlMouseUp = a2

PDF.SaveToFile "test.pdf", true

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