Table of Contents

Class PdfChoiceField

Namespace
MiPdf.Forms
Assembly
MiPdf.dll

A combo box or list box.

public sealed class PdfChoiceField : PdfFormField
Inheritance
PdfChoiceField
Inherited Members

Properties

IsComboBox

True for a combo box (Combo), false for a list box.

public bool IsComboBox { get; }

Property Value

bool

IsEditable

True if values outside the option list are allowed (Edit).

public bool IsEditable { get; }

Property Value

bool

IsMultiSelect

True if several options may be selected (MultiSelect).

public bool IsMultiSelect { get; }

Property Value

bool

Options

The options as (export value, display text) pairs.

public IReadOnlyList<(string Export, string Display)> Options { get; }

Property Value

IReadOnlyList<(string Export, string Display)>

SelectedValues

Selected export values.

public IReadOnlyList<string> SelectedValues { get; }

Property Value

IReadOnlyList<string>

Value

The selected export value, the first one if several are selected (see SelectedValues); null if nothing is selected. Setting it selects a single option (export value or display text, see SetSelection(IEnumerable<string>)); null clears the selection.

public override string? Value { get; set; }

Property Value

string

Methods

RegenerateAppearance()

Rebuilds the appearance streams of all widgets from the current selection, font and /MK settings.

public override void RegenerateAppearance()

SetSelection(IEnumerable<string>)

Selects one or more options (export values or display texts).

public void SetSelection(IEnumerable<string> values)

Parameters

values IEnumerable<string>