---
Product: Aspose.PDF
Platform: go
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/go/comboboxfield
---

# ComboBoxField

## Overview

`ComboBoxField` is a type in Aspose.PDF FOSS for Go.
Inherits from: `fieldBase`.

ComboBoxField is a single-select dropdown choice field.

This type declares 10 methods for ComboBoxField objects in Go programs.
Available methods include: `AddOption`, `Options`, `RemoveOption`, `Selected`, `SetEditable`, `SetReadOnly`, `SetRequired`, `SetSelected`, `SetValue`, `Value`.
Public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

## Methods

| Signature | Description |
|-----------|-------------|
| `Value()` → `string` | Returns the value. |
| `SetValue(s: string)` → `error` | Sets the value value. |
| `Options()` → `[]ChoiceOption` | Returns the options. |
| `Selected()` → `int` | Returns the selected. |
| `SetSelected(index: int)` → `error` | Sets the selected value. |
| `SetEditable(v: bool)` | SetEditable toggles bit 19 (/Ff Edit). |
| `AddOption(o: ChoiceOption)` | AddOption appends a ChoiceOption to /Opt. |
| `RemoveOption(index: int)` → `error` | RemoveOption removes the option at index. |
| `SetReadOnly(v: bool)` | SetReadOnly sets the read-only flag; the choice types share the same setFlag-based mutators as the text field. |
| `SetRequired(v: bool)` | Sets the required value. |

## See Also

- [Aspose.PDF — Enterprise API Reference](https://reference.aspose.com/pdf/)