LONG PDFANNOTATION_OnOtherControlChanged { get; set; } |
The index of the action can be retrieved from any action creating function such asĀ CreateJavaScriptAction.
Equivalent in new interface: IPDFDocument4::OnControlOtherChanged.
{ PDF object is supposed to be created } PDF.BeginDoc; a1 := PDF.CreateJavascriptAction('this.getField("edit2").value = this.getField("edit1").value * this.getField("edit1").value;'); PDF.PDFPAGE_CreateControl_Edit('edit1', 10, 10, 90, 24); PDF.PDFANNOTATION_Text := '3'; PDF.PDFPAGE_CreateControl_Edit('edit2', 10, 30, 90, 44); PDF.PDFANNOTATION_Text := '9'; PDF.PDFANNOTATION_OnOtherControlChanged := a1; { Now the square of the edit1 will be calculated } { in the edit2 when edit1 is changed. } PDF.EndDoc;
// PDF object is supposed to be created PDF->BeginDoc(); LONG a1 = PDF->CreateJavascriptAction("this.getField('edit2').value = this.getField('edit1').value * this.getField('edit1').value;"); PDF->PDFPAGE_CreateControl_Edit("edit1", 10, 10, 90, 24); PDF->PDFANNOTATION_Text = "3"; PDF->PDFPAGE_CreateControl_Edit("edit2", 10, 30, 90, 44); PDF->PDFANNOTATION_Text = "9"; PDF->PDFANNOTATION_OnOtherControlChanged = a1; // Now the square of the edit1 will be calculated // in the edit2 when edit1 is changed. PDF->EndDoc();
// PDF object is supposed to be created PDF.BeginDoc(); long a1 = PDF.CreateJavascriptAction("this.getField('edit2').value = this.getField('edit1').value * this.getField('edit1').value;"); PDF.PDFPAGE_CreateControl_Edit("edit1", 10, 10, 90, 24); PDF.PDFANNOTATION_Text = "3"; PDF.PDFPAGE_CreateControl_Edit("edit2", 10, 30, 90, 44); PDF.PDFANNOTATION_Text = "9"; PDF.PDFANNOTATION_OnOtherControlChanged = a1; // Now the square of the edit1 will be calculated // in the edit2 when edit1 is changed. PDF.EndDoc();
' PDF object is supposed to be created PDF.BeginDoc a1 = PDF.CreateJavascriptAction("this.getField('edit2').value = this.getField('edit1').value * this.getField('edit1').value;") PDF.PDFPAGE_CreateControl_Edit "edit1", 10, 10, 90, 24 PDF.PDFANNOTATION_Text = "3" PDF.PDFPAGE_CreateControl_Edit "edit2", 10, 30, 90, 44 PDF.PDFANNOTATION_Text = "9" PDF.PDFANNOTATION_OnOtherControlChanged = a1 ' Now the square of the edit1 will be calculated ' in the edit2 when edit1 is changed. PDF.EndDoc