DynaPDF Manual - Page 696

Previous Page 695   Index   Next Page 697

Function Reference
Page 696 of 818
calcOrder[3] = 122;
// Move the field of index 1 to index 3
pdfSetFieldCalcOrder(pdf, 1, 3);
// Result:
calcOrder[0] = 5;
calcOrder[1] = 45;
calcOrder[2] = 122;
calcOrder[3] = 9;
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetFieldColor
Syntax:
LBOOL pdfSetFieldColor(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
TFieldColor ColorType, // Color type that should be changed
TPDFColorSpace CS,
// Color space
UI32 Color)
// Color value
typedef enum
{
fcBackColor
= 0,
fcBorderColor = 1,
fcTextColor
= 2
}TFieldColor;
typedef enum
{
csDeviceRGB
= 0,
csDeviceCMYK = 1,
csDeviceGray = 2
}TPDFColorSpace;
The function sets a specific color of an interactive form field. The parameter AField must be a valid
field handle. The background and border color of a form field must be defined in the same color
space. The color space for the text color can be defined in a separate color space (e.g. DeviceGray for
the text and DeviceRGB for the background and border).
If the border or background should appear transparent set the value to NO_COLOR. The text color
cannot be transparent.
#define NO_COLOR 0xFFFFFFF1
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetFieldBorderWidth, SetFieldCalcOrder

Next topic: SetFieldExpValue


Start Chat