Table of Contents

Class SelectFieldItem

Namespace
iText.Forms.Form.Element
Assembly
itext.forms.dll

A field that represents a control for selecting one of the provided options.

public class SelectFieldItem
Inheritance
SelectFieldItem
Inherited Members

Remarks

A field that represents a control for selecting one of the provided options. It is used in the ComboBoxField class.

Constructors

SelectFieldItem(string)

Create a new SelectFieldItem.

public SelectFieldItem(string value)

Parameters

value string

the export value of the item.

SelectFieldItem(string, string)

Create a new SelectFieldItem.

public SelectFieldItem(string exportValue, string displayValue)

Parameters

exportValue string

the export value of the item.

displayValue string

the display value of the item.

SelectFieldItem(string, string, IBlockElement)

Create a new SelectFieldItem.

public SelectFieldItem(string exportValue, string displayValue, IBlockElement optionElement)

Parameters

exportValue string

the export value of the item.

displayValue string

the display value of the item.

optionElement IBlockElement

the option element of the item.

SelectFieldItem(string, IBlockElement)

Create a new SelectFieldItem.

public SelectFieldItem(string value, IBlockElement optionElement)

Parameters

value string

the export value of the item.

optionElement IBlockElement

the option element of the item.

Methods

GetDisplayValue()

Get the display value of the item.

public virtual string GetDisplayValue()

Returns

string

display value.

Remarks

Get the display value of the item. If the display value is not set, the export value will be used as display value.

GetElement()

Get the option element of the item.

public virtual IBlockElement GetElement()

Returns

IBlockElement

option element.

Remarks

Get the option element of the item.

This is the element which will be displayed in the dropdown. It allows for customization.

GetExportValue()

Get the export value of the item.

public virtual string GetExportValue()

Returns

string

export value.

HasExportAndDisplayValues()

Check if the item has a display value.

public virtual bool HasExportAndDisplayValues()

Returns

bool

true if the item has both export and display values, false otherwise.

Remarks

Check if the item has a display value. and export value.