Sign in Join
FPDoc Onlineexperiment

TCustomMaskEdit.Clear procedure

Member of TCustomMaskEditpublicIn unit MaskEdit

Clears the value for the edit control.

Declaration

pascal
procedure Clear

Description

Clear is an overridden procedure used to clear the value for the text in the edit control. Clear uses the value from IsMasked to determine if a mask specification has been assigned for the edit control.

When IsMasked is True, the ClearChar method is called for each position in the EditMask to get the blank value for the mask character. RealSetTextWhileMasked is called to store the new value for the control. The cursor (or caret) is reset to the beginning of the text, and SetCursorPos is called to update the cursor position.

When IsMasked is False, the inherited Clear method is called to update the content for the control.

Clear is used in the implementation of the SetEditMask, RestoreMask, and SetTextApplyMask methods.

See also

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