LONG OnControlOtherChanged { get; set; } |
{ PDF object is supposed to be created } a := PDF.CreateJavascriptAction('this.getField("edit2").value = this.getField("edit1").value * this.getField("edit1").value;'); PDF.AddEditBox(10, 10, 90, 24, 'edit1'); PDF.AnnotUnicodeText := '3'; PDF.AddEditBox(10, 30, 90, 44, 'edit2'); PDF.AnnotUnicodeText := '9'; PDF.OnControlOtherChanged := a; { Now the square of the edit1 will be calculated } { in the edit2 when edit1 is changed. } PDF.SaveToFile('test.pdf', true);
// PDF object is supposed to be created long a = PDF->CreateJavascriptAction("this.getField('edit2').value = this.getField('edit1').value * this.getField('edit1').value;"); PDF->AddEditBox(10, 10, 90, 24, "edit1"); PDF->AnnotUnicodeText = L"3"; PDF->AddEditBox(10, 30, 90, 44, "edit2"); PDF->AnnotUnicodeText = L"9"; PDF->OnControlOtherChanged = a; // Now the square of the edit1 will be calculated // in the edit2 when edit1 is changed. PDF->SaveToFile("test.pdf", true);
// PDF object is supposed to be created long a = PDF.CreateJavascriptAction("this.getField('edit2').value = this.getField('edit1').value * this.getField('edit1').value;"); PDF.AddEditBox(10, 10, 90, 24, "edit1"); PDF.AnnotUnicodeText = "3"; PDF.AddEditBox(10, 30, 90, 44, "edit2"); PDF.AnnotUnicodeText = "9"; PDF.OnControlOtherChanged = a; // Now the square of the edit1 will be calculated // in the edit2 when edit1 is changed. PDF.SaveToFile("test.pdf", true);
' PDF object is supposed to be created a = PDF.CreateJavascriptAction("this.getField('edit2').value = this.getField('edit1').value * this.getField('edit1').value;") PDF.AddEditBox 10, 10, 90, 24, "edit1" PDF.AnnotUnicodeText = "3" PDF.AddEditBox 10, 30, 90, 44, "edit2" PDF.AnnotUnicodeText = "9" PDF.OnControlOtherChanged = a ' Now the square of the edit1 will be calculated ' in the edit2 when edit1 is changed. PDF.SaveToFile "test.pdf", true