Table of Contents

Class AcroComboBoxField

Namespace
UglyToad.PdfPig.AcroForms.Fields
Assembly
UglyToad.PdfPig.dll

A combo box consisting of a drop-down list optionally accompanied by an editable text box in which the user can type a value other than the predefined choices.

public class AcroComboBoxField : AcroFieldBase
Inheritance
AcroComboBoxField
Inherited Members
Extension Methods

Constructors

AcroComboBoxField(DictionaryToken, string, AcroChoiceFieldFlags, AcroFieldCommonInformation, IReadOnlyList<AcroChoiceOption>, IReadOnlyList<string>, IReadOnlyList<int>, int?, PdfRectangle?)

Create a new AcroComboBoxField.

public AcroComboBoxField(DictionaryToken dictionary, string fieldType, AcroChoiceFieldFlags fieldFlags, AcroFieldCommonInformation information, IReadOnlyList<AcroChoiceOption> options, IReadOnlyList<string> selectedOptions, IReadOnlyList<int> selectedOptionIndices, int? pageNumber, PdfRectangle? bounds)

Parameters

dictionary DictionaryToken

The dictionary for this field.

fieldType string

The type of this field, must be Ch.

fieldFlags AcroChoiceFieldFlags

The flags specifying behaviour for this field.

information AcroFieldCommonInformation

Additional information for this field.

options IReadOnlyList<AcroChoiceOption>

The options in this field.

selectedOptions IReadOnlyList<string>

The names of the selected options.

selectedOptionIndices IReadOnlyList<int>

The indices of the selected options where there are multiple with the same name.

pageNumber int?

The number of the page this field appears on.

bounds PdfRectangle?

The location of this field on the page.

Properties

Flags

The flags specifying the behaviour of this field.

public AcroChoiceFieldFlags Flags { get; }

Property Value

AcroChoiceFieldFlags

Options

The options to be presented to the user.

public IReadOnlyList<AcroChoiceOption> Options { get; }

Property Value

IReadOnlyList<AcroChoiceOption>

SelectedOptionIndices

For multiple select lists with duplicate names gives the indices of the selected options.

public IReadOnlyList<int> SelectedOptionIndices { get; }

Property Value

IReadOnlyList<int>

SelectedOptions

The names of any currently selected options.

public IReadOnlyList<string> SelectedOptions { get; }

Property Value

IReadOnlyList<string>