[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'MaskEdit' (#lcl)

# TCustomMaskEdit.SetTextApplyMask

Sets the value for the control after applying its edit mask.

## Declaration

Source position: maskedit.pp line 274

`protected procedure TCustomMaskEdit.SetTextApplyMask(`
`Value: TCaption`
`);`

## Arguments

`Value` |  | Text before mask literals in EditMask are applied.

## Description

SetTextApplyMask is a method used to set the text for the control to the specified Value. It ensures that the EditMask is applied to the value when IsMasked returns True. The ApplyMaskToText method is called to generate the text with mask literals as needed for the EditMask.

RealSetTextWhileMasked is called to apply the masked text value to the control.

When Value is an empty string (''), the Clear method is called to set the control value.

SetTextApplyMask is used in the implementation of the RealSetText method. It is also called from the Loaded method when the component has finished loading during LCL streaming.

## See also

TCustomMaskEdit.IsMasked |  | True if a non-empty value has been assigned to EditMask.
TCustomMaskEdit.EditMask |  | Contains the mask characters classes and literals used to format/obscure the value for the control.
TCustomMaskEdit.Clear |  | Clears the value for the edit control.
TCustomMaskEdit.ApplyMaskToText |  | Applies the edit mask in the control to the specified value.
TCustomMaskEdit.RealSetText |  | Sets the value for the Text in the control.
TCustomMaskEdit.Loaded |  | Performs actions when a component has been loaded from the LCL streaming mechanism.