#include <PdfChoiceField.h>
A list of items in a PDF file. You cannot create this object directly, use PdfComboBox or PdfListBox instead.
- See also
- PdfComboBox
-
PdfListBox
◆ GetItem()
PdfString PdChoiceField::GetItem |
( |
unsigned |
index | ) |
const |
- Parameters
-
- Returns
- the value of the item at the specified index
◆ GetItemCount()
unsigned PdChoiceField::GetItemCount |
( |
| ) |
const |
- Returns
- the number of items in this list
◆ GetItemDisplayText()
- Parameters
-
- Returns
- the display text of the item or if it has no display text its value is returned. This call is equivalent to GetItem() in this case
- See also
- GetItem
◆ GetSelectedIndex()
int PdChoiceField::GetSelectedIndex |
( |
| ) |
const |
Sets the currently selected item
- Returns
- the selected item or -1 if no item was selected
◆ InsertItem()
Inserts a new item into the list
- Parameters
-
value | the value of the item |
displayName | an optional display string that is displayed in the viewer instead of the value |
◆ IsComboBox()
bool PdChoiceField::IsComboBox |
( |
| ) |
const |
◆ IsMultiSelect()
bool PdChoiceField::IsMultiSelect |
( |
| ) |
const |
- Returns
- true if multi selection is enabled for this list
◆ IsSorted()
bool PdChoiceField::IsSorted |
( |
| ) |
const |
- Returns
- true if sorting is enabled
◆ IsSpellcheckingEnabled()
bool PdChoiceField::IsSpellcheckingEnabled |
( |
| ) |
const |
- Returns
- true if spellchecking is enabled for this combobox
◆ RemoveItem()
void PdChoiceField::RemoveItem |
( |
unsigned |
index | ) |
|
Removes an item for the list
- Parameters
-
index | index of the item to remove |
◆ SetMultiSelect()
void PdChoiceField::SetMultiSelect |
( |
bool |
multi | ) |
|
Sets whether multiple items can be selected by the user in the list.
- Parameters
-
multi | if true multiselect will be enabled |
By default multiselection is turned off.
◆ SetSelectedIndex()
void PdChoiceField::SetSelectedIndex |
( |
int |
index | ) |
|
Sets the currently selected item
- Parameters
-
index | index of the currently selected item |
◆ SetSorted()
void PdChoiceField::SetSorted |
( |
bool |
sorted | ) |
|
Enable or disable sorting of items. The sorting does not happen in acrobat reader but whenever adding items using PoDoFo or another PDF editing application.
- Parameters
-
sorted | enable/disable sorting |
◆ SetSpellcheckingEnabled()
void PdChoiceField::SetSpellcheckingEnabled |
( |
bool |
spellCheck | ) |
|
Enable/disable spellchecking for this combobox
- Parameters
-
spellCheck | if true spellchecking will be enabled |
combobox are spellchecked by default