Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 634

Previous Page 633   Index   Next Page 635

Function Reference
Page 634 of 750
SetFieldBorderWidth
Syntax:
LBOOL pdfSetFieldBorderWidth(
const PPDF* IPDF, // Instance pointer
UI32 AField,
// Field handle
double LineWidth) // Line width of the border
This function can be used to change the border width of a field. The parameter AField must be a valid
field handle. The parameter LineWidth must not be negative and it should either be 0, 1, 2, or 3 units
(no border, thin, medium, or thick). Note that Adobe's Acrobat supports only these values. It is
possible to draw a field with any border width, but if the field is repainted due to a reset action or
due to other changes, the field appearance will be changed in Adobe's Acrobat and the border width
is adjusted to the nearest supported value.
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.
 

Previous topic: SetFieldBorderStyle

Next topic: SetFieldExpValue