---
title: "PdfListBoxField"
canonical_url: "https://www.nutrient.io/api/python/editors/pdf/formfields/pdf-list-box-field/"
md_url: "https://www.nutrient.io/api/python/editors/pdf/formfields/pdf-list-box-field.md"
last_updated: "2026-06-09T10:23:03.737Z"
description: "Represents a list box form field in a PDF document. List boxes display a scrollable list of options for selection."
---

Represents a list box form field in a PDF document. List boxes display a scrollable list of options for selection.

```python

from nutrient_sdk import PdfListBoxField

```

**Inherits from:** [`PdfFormField`](/api/python/editors/pdf/formfields/pdf-form-field/)

## Construction

`PdfListBoxField` cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.

## Methods

### add_item

```python

def add_item(self, text: str) -> None

```

```python

def add_item(self, text: str, value: str) -> None

```

Adds an item to the list box.

**Parameters:**

| Name                 | Type  | Description                    |
| -------------------- | ----- | ------------------------------ |
| `text`               | `str` | The display text for the item. |
| `value` *(optional)* | `str` | The export value for the item. |

**Raises:**

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

### remove_item_at

```python

def remove_item_at(self, index: int) -> None

```

Removes an item from the list box at the specified index.

**Parameters:**

| Name    | Type  | Description                              |
| ------- | ----- | ---------------------------------------- |
| `index` | `int` | The 0-based index of the item to remove. |

**Raises:**

- [`IndexOutOfBoundsException`](/api/python/exceptions/index-out-of-bounds-exception/): Thrown when index is out of range.

- [`SdkException`](/api/python/exceptions/sdk-exception/): Thrown when the operation fails.

---

## Properties

### has_selection

```python

@property
def has_selection(self) -> bool

```

Whether the list box has a value selected.

**Type:** `bool`

*Read-only property.*

---

### item_count

```python

@property
def item_count(self) -> int

```

The number of items in the list box.

**Type:** `int`

*Read-only property.*

---

### selected_value

```python

@property
def selected_value(self) -> str

@selected_value.setter
def selected_value(self, value: str) -> None

```

The currently selected value. For multi-select list boxes, this returns the first selected value.

**Type:** `str`

---

## Inherited members

From [`PdfFormField`](../pdf-form-field/): `child`, `child_count`, `default_value`, `field_type`, `full_name`, `is_read_only`, `is_required`, `is_terminal`, `name`, `parent`, `value`, `widget`, `widget_count`, `remove_child_at`

---

## Related pages

- [All public classes import directly from the top-level package:](/api/python/editors/pdf/formfields.md)
- [Pdf Form Field](/api/python/editors/pdf/formfields/pdf-form-field.md)
- [Pdf Check Box Field](/api/python/editors/pdf/formfields/pdf-check-box-field.md)
- [Pdf Push Button Field](/api/python/editors/pdf/formfields/pdf-push-button-field.md)
- [Pdf Combo Box Field](/api/python/editors/pdf/formfields/pdf-combo-box-field.md)
- [Pdf Radio Button Field](/api/python/editors/pdf/formfields/pdf-radio-button-field.md)
- [Pdf Form Field Collection](/api/python/editors/pdf/formfields/pdf-form-field-collection.md)
- [Pdf Signature Field](/api/python/editors/pdf/formfields/pdf-signature-field.md)
- [Pdf Text Field](/api/python/editors/pdf/formfields/pdf-text-field.md)

