DynaPDF Manual - Page 715
Previous Page 714 Index Next Page 716
Function Reference
Page 715 of 839
Example (C++):
// aField is a handle of a combo box in this example; we want to
// deselect the currently selected value, that's all.
char* value, *expValue;
LBOOL selected;
SI32 valCount = pdfGetFieldExpValCount(pdf, aField);
for (SI32 i = 0; i < valCount; i++)
{
if (pdfGetFieldExpValueEx(pdf, aField, i, value, expValue, selected))
{
if (selected)
{
pdfSetFieldExpValue(pdf, aField, i, value, expValue, false);
break;
}
}
}
Remarks:
To enumerate the choice values of a combo box, list box or radio button use the function
GetFieldExpValueEx().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetFieldExpValueEx
Syntax:
LBOOL pdfSetFieldExpValueEx(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
UI32 ValIndex,
// Value index
LBOOL Selected,
// New state
LBOOL DefSelected) // New default state
The function marks a choice value of a combo or list box as selected or unselected. It can also be
used to change the state of check boxes or the children of a radio button. The parameter ValIndex
will be ignored if the field is a normal check box (no child of a radio button or field group).
Remarks:
To enumerate the choice values of a combo box, list box or radio button use the function
GetFieldExpValueEx().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Previous topic: SetFieldExpValue
Next topic: SetFieldFlags