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

TCustomMaskEdit.EditMask

Contains the mask characters classes and literals used to format/obscure the value for the control.

Declaration

Source position: maskedit.pp line 307

protected property TCustomMaskEdit.EditMask : string
  read FRealEditMask
  write SetEditMask;

Description

EditMask is a String property which contains the mask specification for the edit control. EditMask contains the delimited mask fields with the character types, storage specifier, and the character value used to represent a space in the edit mask. For example:

AMaskEdit.EditMask := '999.999;1;0';

The EditMask is formed using a pattern of characters with the following meaning:

\ after this you can set an arbitrary char
> after this the characters are in in uppercase
< after this the character are in lowercase
l only an optional letter
L only a letter
a an optional alphanumeric character (['A'..'Z','a..'z','0'..'9'])
A an alphanumeric character
c any optional Utf-8 character (including a Space character)
C any Utf-8 character in the range #33-#255 (does not include Space)
9 only an optional number
0 only a number
# only an optional number or + or -
: displays the hour separator character
/ displays the date separator character
h an optional hexadecimal character (Lazarus extension, not supported by Delphi)
H a hexadecimal character (Lazarus extension, not supported by Delphi)
b an optional binary character (Lazarus extension, not supported by Delphi)
B a binary character (Lazarus extension, not supported by Delphi)
! Trim leading or trailing blanks, depending on position of the mask character

Setting a new value for the property causes the value to be decomposed into the internal TInternalMask representing the individual characters in the edit mask. Individual UTF-8 characters in Value are either added to the mask as literals or character types. Clear is called to remove the displayed value in the control, and the initial Text value is set to the value from RealGetText.


Version 3.2 Generated 2024-02-25 Home