[Overview][Constants][Types][Classes][Procedures and functions][Index] |
Applies an edit mask to the specified string value.
Source position: maskedit.pp line 393
function FormatMaskText( |
const AEditMask: string; |
const Value: string; |
EnableSets: Boolean = False |
):string; |
AEditMask |
|
Edit mask applied to the specified content. |
Value |
|
Original content modified in the routine. |
EnableSets |
|
Enables or disables set notation in the edit mask. |
Value after applying the specified mask.
FormatMaskText is a String function used to apply an edit mask to the specified String value. FormatMaskText creates a temporary instance of TCustomMaskEdit that is used to apply the edit mask in AEditMask when required. The value in AEditMask is assigned to the EditMask property in TCustomMaskEdit.
The Value argument contains the data without any mask literals, escaped characters, or space characters inserted by the editing mask. When the IsMasked method in the TCustomMaskEdit returns True, the ApplyMaskToText method is used to generate the return value for the routine. To maintain Delphi compatibility, the GetTextWithoutSpaceChar is also called to translate space characters represented using the character in the mask field to the Space character (decimal 32).
The EnableSets argument indicates whether set notation, represented using '[' and ']' characters, are recognized in the edit mask. The value is assigned to the EnableSets property in TMaskEdit/TCustomMaskEdit. When set to False, the '[' and ']' characters used in set notation are treated as literal characters. When set to True, the optional or required set definition is added to the mask. The default value for the property is False.
When IsMasked is False, the unmodified content in Value is used as the return value.
|
Contains the mask characters classes and literals used to format/obscure the value for the control. |
|
|
True if a non-empty value has been assigned to EditMask. |
|
|
Applies the edit mask in the control to the specified value. |
|
|
Gets the value for the control without the Space character literal used in the edit mask. |
Version 4.0 | Generated 2025-05-03 | Home |