DynaPDF Manual - Page 736
Previous Page 735 Index Next Page 737
Function Reference
Page 736 of 860
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