DynaPDF Manual - Page 232

Previous Page 231   Index   Next Page 233

Function Reference
Page 232 of 787
This function is implemented in an Ansi and Unicode compatible variant. The relationship between
collection fields and collection items is explained in more detail under CreateCollection(). DynaPDF
contains also example projects which demonstrate how collection fields and items can be created.
Use the function CheckCollection() to determine whether the connection between collection fields
and collection items is valid.
Return values:
If the function succeeds the return value is the handle of the collection field, a value greater or equal
zero. If the function fails the return value is a negative error code.
SI32 pdfCreateComboBox(
const PPDF* IPDF, // Instance pointer
const char* Name, // Name of combo box
// Sort the choice values
SI32 Parent,
// Parent group field or -1
double PosX,
// X-Coordinate of the combo box
double PosY,
// Y-Coordinate of the combo box
double Width,
// Width of the combo box
double Height)
// Height of the combo box
This function creates a combo box. The choice values of the combo box must be added with the
function AddValToChoiceField(). This function requires the field handle that was returned by this
A combo box can contain value that is not included in the array of choice values. This value can be
used to display a string in the combo box when no choice value is selected, e.g. "Select a value!".
The field value can be set with the function SetFieldExpValue() as follows:
The parameter ValIndex of the function SetFieldExpValue() must be set to PDF_MAX_INT and the
parameter Value must contain the wished value or NULL. If Value is NULL or an empty string, a
maybe existing field value will be deleted. The choice values of the combo box get the state
unselected when setting a field value in this way.
If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the
button. If the coordinate system is top-down it defines the upper left corner.
Like all form fields the width and height is measured incl. the line width of the border. The size of
normal vector graphics is measured without the line width; this must be taken into account when
calculating the width or height of a form field. The line width of the border is derived from the
current graphics state (see SetLineWidth()), it should be either 0, 1, 2, or 3 units (no border, thin,
medium, or thick). The border style can be changed with the functions SetBorderStyle() or

Previous topic: CreateCollectionField

Next topic: CreateDeviceNColorSpace

Start Chat