AddComboBox(String, PdfPage, PdfRectangle, IEnumerable, PdfFieldOptions?) Method

Definition

Namespace Broadside.Forms
Assembly Broadside.dll

Creates a combo box with one widget on page, nothing selected.

public PdfComboBoxField AddComboBox(string name, PdfPage page, PdfRectangle rectangle, IEnumerable<PdfChoiceOption> choices, PdfFieldOptions? options = null)

Parameters

name
String

The field's fully qualified name, as for AddTextField(String, PdfPage, PdfRectangle, PdfFieldOptions?).

page
PdfPage

The page the widget is on, a page of this form's document.

rectangle
PdfRectangle

The widget's rectangle, in default user space.

choices
IEnumerable<PdfChoiceOption>

The options, in the order shown.

options
PdfFieldOptions

The field's flags (Edit, Sort, DoNotSpellCheck, CommitOnSelChange), text appearance and widget colours; null for the defaults.

Returns

PdfComboBoxField
The new field; select an option with SetValue(String?).

Remarks

ISO 32000-2 §12.7.5.4, Tables 233 and 234. A choice field (FT Ch) with the Combo flag and an Opt array (a text string per option, or [export display] when they differ). Otherwise as AddTextField(String, PdfPage, PdfRectangle, PdfFieldOptions?) describes.