Represents a combo box (drop-down list) form field in a PDF document. Combo boxes display a list of options and may optionally allow custom text entry.

from nutrient import PdfComboBoxField

Methods

add_item

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

Adds an item to the combo box.

Parameters:

NameTypeDescription
textstrThe display text for the item.

Raises:

  • SdkException: Thrown when the operation fails.

add_item

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

Adds an item to the combo box with a separate export value.

Parameters:

NameTypeDescription
textstrThe display text for the item.
valuestrThe export value for the item.

Raises:

  • SdkException: Thrown when the operation fails.

get_child

def get_child(self, index: int) -> PdfFormField

Parameters:

NameTypeDescription
indexint

Returns: PdfFormField


get_widget

def get_widget(self, index: int) -> PdfWidgetAnnotation

Parameters:

NameTypeDescription
indexint

Returns: PdfWidgetAnnotation


remove_child_at

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

Parameters:

NameTypeDescription
indexint

remove_item_at

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

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

Parameters:

NameTypeDescription
indexintThe 0-based index of the item to remove.

Raises:

  • IndexOutOfBoundsException: Thrown when index is out of range.
  • SdkException: Thrown when the operation fails.

set_is_read_only

def set_is_read_only(self, value: bool) -> None

Parameters:

NameTypeDescription
valuebool

set_is_required

def set_is_required(self, value: bool) -> None

Parameters:

NameTypeDescription
valuebool

set_selected_value

def set_selected_value(self, value: str) -> None

Sets the currently selected or entered value.

Parameters:

NameTypeDescription
valuestrThe value to set for the SelectedValue property.

set_value

def set_value(self, value: str) -> None

Parameters:

NameTypeDescription
valuestr

Properties

child_count

@property
def child_count(self) -> int

Type: int

Read-only property.


default_value

@property
def default_value(self) -> str

Type: str

Read-only property.


field_type

@property
def field_type(self) -> PdfFormFieldType

Type: PdfFormFieldType

Read-only property.


full_name

@property
def full_name(self) -> str

Type: str

Read-only property.


has_selection

@property
def has_selection(self) -> bool

Gets whether the combo box has a value selected or entered.

Type: bool

Read-only property.


is_read_only

@property
def is_read_only(self) -> bool

Type: bool

Read-only property.


is_required

@property
def is_required(self) -> bool

Type: bool

Read-only property.


is_terminal

@property
def is_terminal(self) -> bool

Type: bool

Read-only property.


item_count

@property
def item_count(self) -> int

Gets the number of items in the combo box.

Type: int

Read-only property.


name

@property
def name(self) -> str

Type: str

Read-only property.


parent

@property
def parent(self) -> PdfFormField

Type: PdfFormField

Read-only property.


selected_value

@property
def selected_value(self) -> str

Gets the currently selected or entered value.

Type: str

Read-only property.


value

@property
def value(self) -> str

Type: str

Read-only property.


widget_count

@property
def widget_count(self) -> int

Type: int

Read-only property.