Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomTextEditProperties.IsDisplayValueValid(TcxEditValue,Boolean) Method

Determines whether the specified display value is valid.

#Declaration

Delphi
function IsDisplayValueValid(var ADisplayValue: TcxEditValue; AEditFocused: Boolean): Boolean; virtual;

#Parameters

Name Type
ADisplayValue TcxEditValue
AEditFocused Boolean

#Returns

Type
Boolean

#Remarks

The IsDisplayValueValid method returns True if the specified display value is valid and can be assigned to the Text property which stores the display value for an editor. Otherwise, it returns False.

The function is called when

  1. Assigning a value to the editor Text property;

  2. Pasting the text from the clipboard;

  3. Cutting the text to the clipboard.

If a user changes the display value by typing text, every character is validated by the editor’s IsValidChar protected method instead.

The ValidateDisplayValue method validates the display value before converting it to the edit value (when a user moves focus to another control or presses the Enter key).

See Also