Skip to main content

CalculateCheckStates(TcxEditValue,IcxCheckItems,TcxCheckStatesValueFormat,TcxCheckStates) Method

Calculates the check box items’ check states for the specified edit value of a check box.

Declaration

function CalculateCheckStates(const AValue: TcxEditValue; AItems: IcxCheckItems; AValueFormat: TcxCheckStatesValueFormat; var ACheckStates: TcxCheckStates): Boolean;

Parameters

Name Type
AValue TcxEditValue
AItems IcxCheckItems
AValueFormat TcxCheckStatesValueFormat
ACheckStates TcxCheckStates

Returns

Type
Boolean

Remarks

The CalculateCheckStates function calculates the items’ check states for a particular edit value of the specified format and returns the successful result of the calculation. This might be useful for data-aware editors.

The AValue and AValueFormat parameters represent the edit value for which the calculation is performed and its format, respectively. The AItems parameter corresponds to the check box items whose states are checked (for instance, via the Properties.Items property of the check group box editor). The instance of the TcxCheckStates type which will contain the check state values is passed as the ACheckStates parameter.

If successful, the result of the calculation is True and the ACheckStates parameter represents an array of check states which match the specified edit value. Otherwise, the result is False.

Note

The CalculateCheckStatesValues function represents the inverse operation for the CalculateCheckStates function.

See Also