Class
ListBoxField

List box form field that shows a scrollable set of predefined options; supports single or multi‑selection for capturing one or several values in a PDF form.

Definition

Constructors

ListBoxField(string)

Create a list box field with the specified fieldName.

Declaration

cs-api-definition
public ListBoxField(string fieldName)

Parameters

fieldName

string

The field name.

Properties

AllowMultiSelection

Gets or sets whether the user may select more than one option (enables multi‑value submission when true).

Declaration

cs-api-definition
public bool AllowMultiSelection { get; set; }

Property Value

bool

true to allow multiple selection; false to restrict selection to a single item.

DefaultValue

Gets or sets the options selected after a form reset (default selection state).

Declaration

cs-api-definition
public ChoiceOption[] DefaultValue { get; set; }

Property Value

ChoiceOption[]

An array of default selected options, or null if no default selections are specified.

FieldType

Gets the form field type identifier (ListBox) used during export and processing.

Declaration

cs-api-definition
public override sealed FormFieldType FieldType { get; }

Property Value

FormFieldType

Overrides FormField.FieldType

TopIndex

Gets or sets the zero‑based index of the first option displayed (initial scroll position).

Declaration

cs-api-definition
public int TopIndex { get; set; }

Property Value

int

Value

Gets or sets the currently selected options; assign an array to change the selection and refresh widget appearances.

Declaration

cs-api-definition
public ChoiceOption[] Value { get; set; }

Property Value

ChoiceOption[]

An array containing all selected options, or null if no options are selected.