DynaPDF Manual - Page 384

Previous Page 383   Index   Next Page 385

Function Reference
Page 384 of 821
{
if (calcOrder[i] == fieldTotal)
{
found |= 1;
fieldTotalIndex = i;
if (found == 3) break; // Both fields found?
}else if (calcOrder[i] == fieldSubTotal)
{
found |= 2;
fieldSubTotalIndex = i;
if (found == 3) break; // Both fields found?
}
}
if (found == 3)
{
if (fieldTotalIndex < fieldSubTotalIndex)
pdfSetFieldCalcOrder(PDF, fieldTotalIndex, fieldSubTotalIndex);
}
pdfFreeUniBuf(PDF); // Optional but recommended: release the buffer
}
}
Return values:
If the function succeeds the return value is greater or equal zero. If the function fails the return value
is a negative error code.
GetFieldChoiceValue
Syntax:
LBOOL pdfGetFieldChoiceValue(
const PPDF* IPDF,
// Instance pointer
UI32 AField,
// Field handle
UI32 ValIndex,
// Value index
struct TPDFChoiceValue* Value) // See below
struct TPDFChoiceValue
{
UI32 StructSize;
// Must be initialized with sizeof(TPDFChoiceValue)
char* ExpValueA;
// Export value (optional)
UI16* ExpValueW;
// Export value (optional)
UI32 ExpValueLen; // Export value length in characters
char* ValueA;
// Value (can be an empty string or NULL)
UI16* ValueW;
// Value (can be an empty string or NULL)
UI32 ValueLen;
// Value length in characters
LBOOL Selected;
// If true, the value is selected
};
The function retrieves a choice value of a combo or list box. The function can also be used to extract
optional export values of radio buttons. The parameter AField must be a valid handle of a combo
box, list box, or radio button. ValIndex is the array index of the choice value to be retrieved.
For list and combo boxes call GetFieldExpValCount() to determine how many choice values are
available in the combo or list box.
 

Previous topic: GetFieldBorderWidth, GetFieldCalcOrder

Next topic: GetFieldColor


Start Chat