Sign in Join
FPDoc Onlineexperiment

TCustomMaskEdit.SetEditText procedure

Member of TCustomMaskEditprotectedIn unit MaskEdit

Sets the value for the EditText property.

Declaration

pascal
procedure SetEditText(const AValue: string)

Description

SetEditText sets the value for the Text displayed in the control. The new value for the text is padded (when needed) to the length defined in the edit mask. SetEditText calls RealSetTextWhileMasked to store the value in the Text in the control.

This method is not Delphi compatible, but this is by design. Delphi allows setting the EditText to any length, which is extremely dangerous! This method ensures that the text assigned in the control does not exceed the length specified by its edit mask.

See also

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