Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

DynaPDF.CreateListBox

This function creates a list box.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 4.2 Yes Yes Yes Yes Yes

MBS( "DynaPDF.CreateListBox"; PDF; Name; Sort; Parent; PosX; PosY; Width; Height )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Name Name of the field "IsMale"
Sort Sort the choice values? 0 = no, 1 = yes. 1
Parent Parent group field if any or -1. -1
PosX X-Coordinate of the text field. 100
PosY Y-Coordinate of the text field. 100
Width Width of the text field. 100
Height Height of the text field. 20

Result

Returns handle or error.

Description

This function creates a list box.
The choice values of the list box must be added with the function DynaPDF.AddValToChoiceField. This function requires the field handle that was returned by this function.

If the coordinate system is bottom-up the point PosX, PosY defines the lower left corner of the list box. 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 DynaPDF.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 DynaPDF.SetFieldBorderStyle.

The values of the list box are sorted if the parameter Sort is true. List boxes support multiple selected values. To enable multi selection add the flag ffMultiSelect to the field (see DynaPDF.SetFieldFlags for further information).
A list box requires a font. If no font is active the standard font Helvetica is used. Note that if the form must be compatible to Acrobat 4, the used fonts by the form fields must be restricted to the 14 standard fonts (see SetFont() for further information). Acrobat 4 does not support interactive forms that use other fonts than the 14 standard fonts. Such a form requires Acrobat 5 or higher.

However, it is possible to use an arbitrary font as long as the code page 1252 is used.

The font size of a list box is set to "auto" if either the font size of the active font is set to 1.0 unit or if no font is active when the field is created.

A text field can be formatted and the allowed input values can be restricted to specific data formats. See DynaPDF.SetDateTimeFormat, DynaPDF.SetNumberFormat for further information.

Specific flags supported by list boxes:
• Sorted // Change the sort flag if necessary
• MultiSelect // Enable multi selection

Earlier versions of DynaPDF allowed the usage of arbitrary 8 bit code pages. Due to changes in Acrobat viewer applications it is no longer possible to use another code page than 1252. In addition, it seems that Acrobat versions greater 6 do no longer support Type1 fonts in form fields, with the exception of the 14 standard fonts.

Interactive form fields can be structured into several groups by passing a handle of a group field to the parameter Parent. See DynaPDF.CreateGroupField for further information.

If the function succeeds the return value is the handle of the combo box, a value greater or equal zero. If the function fails the return value is a negative error code.

See also CreateListBox function in DynaPDF manual.

See also


DynaPDF.CreateJSAction   -   DynaPDF.CreateNamedDest

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins