Class PdfListBox

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

A scrollable list of choices, of which one or, with MultiSelect, several can be selected. Created with AddListBox(string, double, double, double, double, IEnumerable<string>, string?).

public sealed class PdfListBox : PdfFormField
Inheritance
PdfListBox
Inherited Members

Remarks

The appearance lists the options from the top, one per line, with selected options highlighted; options that do not fit the box are reached by scrolling in the viewer.

Properties

Font

The font of the options; a Latin standard font. Defaults to Helvetica.

FontSize

The font size, in points. Defaults to 12.

MultiSelect

Whether the user may select more than one option. Defaults to false.

Options

The choices, in display order.

SelectedValues

The selected options; empty for none. Each must be one of Options, and there may be more than one only if MultiSelect is set.

TextColor

The text colour. Defaults to black.

Value

The first selected option, or null for none. Setting it selects exactly that option, or clears the selection when set to null.