Package com.evopdf

# Class PdfFormListBox

java.lang.Object
com.evopdf.PdfFormField
com.evopdf.PdfFormListBox

public class PdfFormListBox extends PdfFormField
Represents a list box in a PDF form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PdfFormListBox(RectangleFloat box, String[] items, PdfFont pdfFont)`
  Constructs a list box form field

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `allowMultiSelect()`
  Gets the flag indicating if it is allowed to have multiple selections in list box
  `boolean`
  `commitOnSelectionChanged()`
  Gets the flag indicating if a new value selected is committed immediately without waiting to leave the field
  `PdfFont`
  `font()`
  Gets the font of the items in the list
  `String[]`
  `listItems()`
  Gets the items in the list box
  `void`
  `setAllowMultiSelect(boolean allowMultiSelect)`
  Sets the flag indicating if it is allowed to have multiple selections in list box.
  `void`
  `setCommitOnSelectionChanged(boolean commitOnSelChange)`
  Sets the flag indicating if a new value selected is committed immediately without waiting to leave the field
  `void`
  `setFont(PdfFont pdfFont)`
  Sets the font of the items in the list
  `void`
  `setListItems(String[] listItems)`
  Sets the items in the list box
  `void`
  `setSortItems(boolean sortItems)`
  Sets the flag indicating if the list items are sorted alphabetically
  `void`
  `setSpellChecking(boolean spellCheck)`
  Sets flag indicating if the spell checking is enabled.
  `void`
  `setValue(String fieldValue)`
  Sets the list box value
  `boolean`
  `sortItems()`
  Gets the flag indicating if the list items are sorted alphabetically
  `boolean`
  `spellChecking()`
  Gets the flag indicating if the spell checking is enabled
  `String`
  `value()`
  Gets the list box value

  ### Methods inherited from class com.evopdf.PdfFormField

  `boundingRectangle, defaultValue, export, flatten, name, parentForm, readOnly, required, setAction, setBoundingRectangle, setDefaultValue, setExport, setFlatten, setName, setReadOnly, setRequired, setStyle, setToolTip, style, toolTip`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PdfFormListBox

    public PdfFormListBox(RectangleFloat box, String[] items, PdfFont pdfFont)
    Constructs a list box form field
    Parameters:
      `box` - the list box control bounding box
      `items` - the list box items
      `pdfFont` - the list box items font

- ## Method Details

  - ### listItems

    public String[] listItems()
    Gets the items in the list box
    Returns:
      the items in the list box

  - ### setListItems

    public void setListItems(String[] listItems)
    Sets the items in the list box
    Parameters:
      `listItems` - the items in the list box to set

  - ### value

    public String value()
    Gets the list box value
    Returns:
      the list box value

  - ### setValue

    public void setValue(String fieldValue)
    Sets the list box value
    Parameters:
      `fieldValue` - the list box value to set

  - ### font

    public PdfFont font()
    Gets the font of the items in the list
    Returns:
      the font of the items in the list

  - ### setFont

    public void setFont(PdfFont pdfFont)
    Sets the font of the items in the list
    Parameters:
      `pdfFont` - the font of the items in the list to set

  - ### allowMultiSelect

    public boolean allowMultiSelect()
    Gets the flag indicating if it is allowed to have multiple selections in list box
    Returns:
      the flag value

  - ### setAllowMultiSelect

    public void setAllowMultiSelect(boolean allowMultiSelect)
    Sets the flag indicating if it is allowed to have multiple selections in list box. This property is false by default
    Parameters:
      `allowMultiSelect` - the flag value to set

  - ### sortItems

    public boolean sortItems()
    Gets the flag indicating if the list items are sorted alphabetically
    Returns:
      the flag value

  - ### setSortItems

    public void setSortItems(boolean sortItems)
    Sets the flag indicating if the list items are sorted alphabetically
    Parameters:
      `sortItems` - the flag value to set

  - ### spellChecking

    public boolean spellChecking()
    Gets the flag indicating if the spell checking is enabled
    Returns:
      the flag value

  - ### setSpellChecking

    public void setSpellChecking(boolean spellCheck)
    Sets flag indicating if the spell checking is enabled. This property is false by default
    Parameters:
      `spellCheck` - the flag value to set

  - ### commitOnSelectionChanged

    public boolean commitOnSelectionChanged()
    Gets the flag indicating if a new value selected is committed immediately without waiting to leave the field
    Returns:
      the flag value

  - ### setCommitOnSelectionChanged

    public void setCommitOnSelectionChanged(boolean commitOnSelChange)
    Sets the flag indicating if a new value selected is committed immediately without waiting to leave the field
    Parameters:
      `commitOnSelChange` - the flag value to set