DynaPDF Manual - Page 256
Previous Page 255 Index Next Page 257
Function Reference
Page 256 of 860
"{\n"
" event.value = strTabDelimited({oDoc: this, oTarget:"
"event.target, bFieldNames: true});\n"
"}\n"
"catch(e)\n"
"{\n"
" event.value = \" \";\n"
"};\n";
act = pdfCreateJSAction(pdf, updateBarcode);
// Add the action to the barcode field
pdfAddActionToObj(pdf, otField, oeOnCalc, act, f);
pdfEndPage(pdf);
// Make sure that a viewer updates the field appearance
pdfSetNeedAppearance(pdf, true);
retval = pdfCloseFile(pdf);
pdfDeletePDF(pdf);
return retval;
}
CreateButton
Syntax:
SI32 pdfCreateButton(
const PPDF* IPDF,
// Instance pointer
const char* Name,
// Name of the button
const char* Caption, // Caption
SI32 Parent,
// Parent group field or -1
double PosX,
// X-Coordinate of the button
double PosY,
// Y-Coordinate of the button
double Width,
// Width in unscaled units
double Height)
// Height in unscaled units
This function creates a push button. The parameter Name must be a unique name for the button
field. It is not allowed to create two buttons with an identical name within the hierarchy in which
they appear.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the
button. If the coordinate system is top-down it defines the upper left corner.
Like all form fields, the width and height is measured incl. the line width of the border. The size of
normal vector graphics is measured without the line width; this must be taken into account when
calculating the width and height of a form field.
The border is drawn by using the current line width and border style (see SetBorderStyle()).
However, interactive form fields support natively the line width 1, 2 and 3 units only (thin, medium,
Previous topic: CreateBarcodeField
Next topic: CreateCheckBox