DynaPDF Manual - Page 395

Previous Page 394   Index   Next Page 396

Function Reference
Page 395 of 839
Return values:
If the function succeeds the return value is the border style, a value greater or equal zero. If the
function fails the return value is a negative error code.
GetFieldBorderWidth
Syntax:
double pdfGetFieldBorderWidth(
const PPDF* IPDF, // Instance pointer
UI32 AField)
// Field handle
The function returns the line width of the border of a field. The parameter AField must be a valid
field handle. All field types are supported by this function.
Return values:
If the function succeeds the return value is the line width of the field's border (a value greater or
equal zero). If the function fails the return value is a negative error code.
GetFieldCalcOrder
Syntax:
SI32 pdfGetFieldCalcOrder(
const PPDF* IPDF, // Instance pointer
UI32** Out)
// Required -> address of a UI32* variable
The function retrieves the calculation order of form fields which contain an action in the OnCalc
event (see AddActionToObj() for further information). This is the order in which their values will be
recalculated when the value of any field changes. The retrieved array values are field handles.
The parameter Out must be the address of a UI32* variable. The function stores the array in an
internal Unicode buffer. To release the buffer when no longer needed call FreeUniBuf(). The buffer
is automatically released when CloseFile() or FreePDF() is called the next time.
To change the calculation order of a specific field call SetFieldCalcOrder().
Example (C++):
// Assume we have a form in which the fields "total" and "subtotal" are
// calculated in the wrong order. The field subtotal should be calculated
// before the field total.
SI32
fieldTotal = pdfFindField(PDF, "total");
SI32 fieldSubTotal = pdfFindField(PDF, "subtotal");
if (fieldTotal >= 0 && fieldSubTotal >= 0)
{
UI32* calcOrder;
SI32 i, count, found = 0, fieldTotalIndex, fieldSubTotalIndex;
if ((count = pdfGetFieldCalcOrder(PDF, &calcOrder)) >= 0)
{
for (i = 0; i < count; i++)
 

Previous topic: GetFieldBackColor, GetFieldBorderColor, GetFieldBorderStyle

Next topic: GetFieldChoiceValue