DynaPDF Manual - Page 221

Previous Page 220   Index   Next Page 222

Function Reference
Page 221 of 777
This function is implemented in an Ansi and Unicode compatible version. However, CJK encodings
or Unicode are NOT supported by form fields. It is possible to use Unicode strings but the font must
NOT use the code page cpUnicode. Unicode strings must contain characters of the actual used 8 bit
code page.
Buttons requires a font, if no font was set before Helvetica is used to draw the caption by using the
code page 1252. The caption is centred horizontally and vertically. By default the caption is drawn on
multiple lines if it does not fit into a single line. To avoid a line break inside a button field remove the
flag ffMultiline (see SetFieldFlags()).
Buttons are excluded from printing by default. If a button should be printable set the flag ffPrint (see
SetFieldFlags() for further information).
Interactive form fields can be structured into several groups by passing a handle of a group field to
the parameter Parent. See CreateGroupField() for further information.
Return values:
If the function succeeds the return value is the field handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
SI32 pdfCreateCheckBox(
const PPDF* IPDF,
// Instance pointer
const char* Name,
// Name of the check box (see note below)
const char* ExpValue, // Export value (required)
LBOOL Checked,
// If true, the check box appears checked
SI32 Parent,
// A parent group or radio button field or -1
double PosX,
// X-Coordinate of the button
double PosY,
// Y-Coordinate of the button
double Width,
// Width of the check box
double Height)
// Height of the check box
This function creates a check box. A check box can be a subfield of a radio button or of a group field
(see also CreateRadioButton(), CreateGroupField()). If the parameter Parent is -1 the check box is
creates as stand alone field.
The parameter Name is ignored if the check box is a sub control of a radio button field, it can be
NULL in the latter case. However, the name is required if the check box is used as stand alone field.

Previous topic: CreateButton

Next topic: CreateCIEColorSpace