DynaPDF Manual - Page 659

Previous Page 658   Index   Next Page 660

Function Reference
Page 659 of 777
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.
SetFieldExpValue
Syntax:
LBOOL pdfSetFieldExpValue(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
SI32 ValIndex,
// Value index or -1
const char* Value,
// New value
const char* ExpValue, // New export value
LBOOL Selected)
// Select the value?
This function can be used to change the choice values of a combo or list box, or to change the state
and export value of check box. In the latter case, the parameter ValIndex will be ignored. If the field
handle refers to a radio button, ValIndex represents the index into the Kids array of the radio botton.
 

Previous topic: SetFieldBorderWidth, SetFieldCalcOrder

Next topic: SetFieldExpValueEx