.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfChoiceFormField Class

Represents a choice field (a combo box, list box) on a PDF form.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v21.2.Core.dll

Declaration

public class PdfChoiceFormField :
    PdfInteractiveFormField

Remarks

The code sample below retrieves a combo box form field by name and changes its properties:

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("FormDemo.pdf");
    ChangeFormFields(pdfDocumentProcessor);
    pdfDocumentProcessor.SaveDocument("FormDemo.pdf");
    Process.Start(new ProcessStartInfo("FormDemo.pdf")
       { UseShellExecute = true });
}


  private static void ChangeFormFields(PdfDocumentProcessor pdfDocumentProcessor)
  {
      //Change combo box field properties:
      PdfChoiceFormField nationalityFormField = (PdfChoiceFormField)acroForm.GetFormField("Nationality");
      nationalityFormField.Editable = false;
      nationalityFormField.MultiSelect = false;
  }

Inheritance

Object
DevExpress.Pdf.Native.PdfDocumentItem
DevExpress.Pdf.Native.PdfObject
PdfInteractiveFormField
PdfChoiceFormField
See Also