Click or drag to resize
Pdf Library for .NET

PdfFormFieldListBox Class

A list box field (single- or multi-select).
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfFormField
    SelectPdf.UniversalPdfFormFieldListBox

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.6
Syntax
public class PdfFormFieldListBox : PdfFormField

The PdfFormFieldListBox type exposes the following members.

Properties
 NameDescription
Public propertyCaption Gets the caption a field of an XFA form shows beside its input area, or null (an AcroForm field has none).
(Inherited from PdfFormField)
Public propertyDisplayPage Gets the zero-based index of the page the field is on, or -1. For a field of an XFA form that lays itself out, its page of the form as laid out (the pages the form has once flattened), and -1 when the field is not laid out.
(Inherited from PdfFormField)
Public propertyDisplayRectangle Gets the field rectangle on its page (in PDF points). For a field of an XFA form that lays itself out, the rectangle on its page of the form as laid out, and an empty rectangle when the field is not laid out.
(Inherited from PdfFormField)
Public propertyFlatten Gets or sets a value indicating whether this field is flattened on save. A field of an XFA form that lays itself out is not flattened on its own: set Flatten to flatten the whole form.
(Inherited from PdfFormField)
Public propertyFormattedValue Gets the value of the field as it is shown. For a field of an XFA form, the value formatted by the field's display pattern (a date or a number as the form shows it); for an AcroForm field, its value.
(Inherited from PdfFormField)
Public propertyFullName Gets the fully-qualified field name. For a field of an XFA form, the field's path in the form as the form's scripts name it (for example form1[0].Page1[0].Name[0]).
(Inherited from PdfFormField)
Public propertyItemsGets the export value of every item in the list box.
Public propertyItemsCountGets the number of items in the list box.
Public propertyItemTextsGets the text every item of the list box shows, in the order of Items.
Public propertyMultiSelect Gets or sets a value indicating whether multiple items may be selected. On a field of an XFA form it cannot be set.
Public propertyName Gets or sets the field name. The name of a field of an XFA form cannot be changed.
(Inherited from PdfFormField)
Public propertyReadOnlyGets or sets a value indicating whether the field is read-only.
(Inherited from PdfFormField)
Public propertyRequiredGets a value indicating whether the form requires the field to be filled.
(Inherited from PdfFormField)
Public propertySelectedIndexes Gets or sets the zero-based indexes of the selected items. On a field of an XFA form, setting them is choosing the items, as in Acrobat.
Public propertySelectedValues Gets or sets the values of the selected items. On a field of an XFA form, setting them is choosing the items, as in Acrobat.
Public propertyToolTipGets the text a viewer shows when the pointer rests on the field, or null.
(Inherited from PdfFormField)
Public propertyVisible Gets a value indicating whether the field is shown. A field of an XFA form is not shown when the form hides it or does not lay it out; an AcroForm field when its widget is hidden.
(Inherited from PdfFormField)
Public propertyWidgets Gets the collection of widgets (visual placements) of this field. A field of an XFA form that lays itself out has one, and a radio group one per button.
(Inherited from PdfFormField)
Top
Example
PdfFormManager manager = new PdfFormManager();
manager.Load("form.pdf");
PdfFormFieldListBox toppings =
    manager.Fields["toppings"] as PdfFormFieldListBox;
toppings.SelectedValues = new string[] { "cheese", "olives" };
manager.Save("filled.pdf");
See Also