Skip to main content

TdxTokenEditProperties.ValidateDisplayValue(TcxEditValue,TCaption,Boolean,TcxCustomEdit) Method

Validates the specified display value.

Declaration

procedure ValidateDisplayValue(var ADisplayValue: TcxEditValue; var AErrorText: TCaption; var AError: Boolean; AEdit: TcxCustomEdit); override;

Parameters

Name Type
ADisplayValue TcxEditValue
AErrorText TCaption
AError Boolean
AEdit TcxCustomEdit

Remarks

This procedure validates the display value passed as the ADisplayValue parameter. If the passed value cannot be converted to the edit value, the ValidateDisplayValue procedure returns True and an error description as the AError and AErrorText parameters, respectively.

If an editor passed as the AEdit parameter has an OnValidate event handler assigned, the ValidateDisplayValue procedure raises this event, allowing you to modify the validation results. In this case, the ValidateDisplayValue procedure passes the ADisplayValue, AErrorText, and AError values as parameters to the OnValidate event handler.

If the ValidateDisplayValue procedure or the OnValidate event handler sets the AError parameter to True, the specified display value is not converted to the edit value, and the following effects indicate the error:

  • The system sound is played, provided that the BeepOnError property is set to True;

  • An exception is raised, provided that the evoRaiseException flag is set to the ValidationOptions property.

The ValidateDisplayValue procedure calls the EditValueToTokens function to interpret the passed TcxEditValue value as a set of token ID strings.

See Also