iText 8.0.5 API
iText.Forms.Form.Element.SelectFieldItem Class Reference

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

Public Member Functions

  SelectFieldItem (String exportValue, String displayValue)
  Create a new SelectFieldItem. More...
 
  SelectFieldItem (String value)
  Create a new SelectFieldItem. More...
 
  SelectFieldItem (String value, IBlockElement optionElement)
  Create a new SelectFieldItem. More...
 
  SelectFieldItem (String exportValue, String displayValue, IBlockElement optionElement)
  Create a new SelectFieldItem. More...
 
virtual String  GetExportValue ()
  Get the export value of the item. More...
 
virtual String  GetDisplayValue ()
  Get the display value of the item. More...
 
virtual IBlockElement  GetElement ()
  Get the option element of the item. More...
 
virtual bool  HasExportAndDisplayValues ()
  Check if the item has a display value. More...
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ SelectFieldItem() [1/4]

iText.Forms.Form.Element.SelectFieldItem.SelectFieldItem ( String  exportValue,
String  displayValue 
)
inline

Create a new SelectFieldItem.

Parameters
exportValue the export value of the item.
displayValue the display value of the item.

◆ SelectFieldItem() [2/4]

iText.Forms.Form.Element.SelectFieldItem.SelectFieldItem ( String  value )
inline

Create a new SelectFieldItem.

Parameters
value the export value of the item.

◆ SelectFieldItem() [3/4]

iText.Forms.Form.Element.SelectFieldItem.SelectFieldItem ( String  value,
IBlockElement  optionElement 
)
inline

Create a new SelectFieldItem.

Parameters
value the export value of the item.
optionElement the option element of the item.

◆ SelectFieldItem() [4/4]

iText.Forms.Form.Element.SelectFieldItem.SelectFieldItem ( String  exportValue,
String  displayValue,
IBlockElement  optionElement 
)
inline

Create a new SelectFieldItem.

Parameters
exportValue the export value of the item.
displayValue the display value of the item.
optionElement the option element of the item.

Member Function Documentation

◆ GetDisplayValue()

virtual String iText.Forms.Form.Element.SelectFieldItem.GetDisplayValue ( )
inlinevirtual

Get the display value of the item.

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

Returns
display value.

◆ GetElement()

virtual IBlockElement iText.Forms.Form.Element.SelectFieldItem.GetElement ( )
inlinevirtual

Get the option element of the item.

Get the option element of the item.

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

Returns
option element.

◆ GetExportValue()

virtual String iText.Forms.Form.Element.SelectFieldItem.GetExportValue ( )
inlinevirtual

Get the export value of the item.

Returns
export value.

◆ HasExportAndDisplayValues()

virtual bool iText.Forms.Form.Element.SelectFieldItem.HasExportAndDisplayValues ( )
inlinevirtual

Check if the item has a display value.

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

Returns

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