Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 636

Previous Page 635   Index   Next Page 637

Function Reference
Page 636 of 750
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 redio 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