Click or drag to resize
Pdf Library for .NET

PdfFormFieldComboBox Class

A combo box (drop-down) field.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfFormField
    SelectPdf.UniversalPdfFormFieldComboBox

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

The PdfFormFieldComboBox 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 combo box.
Public propertyItemsCountGets the number of items in the combo box.
Public propertyItemTextsGets the text every item of the combo box shows, in the order of Items.
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 propertySelectedIndex Gets or sets the zero-based index of the selected item (-1 = none). On a field of an XFA form, setting it is choosing the item, as in Acrobat: the form's scripts for the change run, then its calculations and its validation.
Public propertySelectedValue Gets or sets the value of the selected item. On a field of an XFA form, setting it is choosing the item (or typing the value, when the field accepts text of its own), 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");
PdfFormFieldComboBox country =
    manager.Fields["country"] as PdfFormFieldComboBox;
country.SelectedValue = "France";
manager.Save("filled.pdf");
See Also