Class PdfChoiceField
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
IsEditable
True if values outside the option list are allowed (Edit).
public bool IsEditable { get; }
Property Value
IsMultiSelect
True if several options may be selected (MultiSelect).
public bool IsMultiSelect { get; }
Property Value
Options
The options as (export value, display text) pairs.
public IReadOnlyList<(string Export, string Display)> Options { get; }
Property Value
SelectedValues
Selected export values.
public IReadOnlyList<string> SelectedValues { get; }
Property Value
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
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
valuesIEnumerable<string>