Sign in Join
FPDoc Onlineexperiment

TValueListEditor.ValidateEntry function

Member of TValueListEditorprotectedIn unit ValEdit

Validates data entered in a cell in the control.

Declaration

pascal
function ValidateEntry(const ACol: Integer; const ARow: Integer; 
 const OldValue: string; var NewValue: string)
: Boolean; override

Arguments

ACol

Column number for the new value.

ARow

Row number for the new value.

OldValue

The old value for the cell.

NewValue

The new value for the cell.

Function result

True if the cell value is valid.

Description

ValidateEntry is an overridden Boolean function used to validate data entered in a cell in the control. The return value is True if NewValue is acceptable for use in the cell at the specified coordinates.

ValidateEntry calls the inherited method, which signals the OnValidateEntry event handler (when assigned). ValidateEntry checks for duplicate names in the Key column when the value KeyUnique is included in the KeyOptions property.

The return value is False if a duplicate Key name is found in Strings. A dialog message is displayed with the message in rsVLEDuplicateKey, and the Editor re-selects the content in the control.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.