TMaskEnh Object
Properties Methods Events

Unit
MaskEnh

Declaration
TMaskEnh = class(TObject)

Description
TMaskEnh class can be considered the "mask processor", into which you set the required mask attributes and extract the resulting values. This class is used by TCustomEditEnh and derived controls. The mask processor is able to manipulate "standard" masks (like those defined for the VCL TMaskEdit control) as well mask strings which use extended character definitions for "enhanced" mask processing. NOTE: The processing of VCL standard masks is NOT 100% compatible, particularly when the "!" control character is used. You should test such mask prior to implementation. Note: The StringList property MaskList is defined so that all instances of TMaskEnh which do not actually use a specifically defined MaskList, all use the same instance of an empty string list. So there should be no overhead other than the pointer/reference to this common list.

Introduced Public Properties
AssigningText  Property set to true when text is being assigned directly - rather than the char-by-char input that occurs during user-entry.
IsEmpty  Call this to see if any input has been made to the mask.
Mask  Get/Set the Mask definiton string.
MaskEx  Refer to TCustomEditEnh.SetEditMaskEx for details.
MaskLen  The number of character positions represented by the mask.
MaskList  Get/Set a list of masks which will be dynamically selected according to how they match the current input value.
Mode  Get/Set the current mode of the mask processor.
Position  ReadOnly property representing the current processor position in the mask.
Text  Get/Set the current text value.
ValidateOnSetText  Determines whether the processor should validate the input when set directly use the Text property or SetMaskedText function.

Introduced Public Methods
AdjustMaskPos   Attempts to calculate the correct mask position for the next input character.
Clear   Clears the masks storage of input text.
Create
DeleteBackSpace   Called to delete the previous input character.
DeleteForward   Called to delete the next input character.
DeleteRange   Called to delete Len characters from the current position.
Destroy
GetDisplayPosition   Calculates what character position in the actually displayed text corresponds to the current mask position.
GetIsLeftJust   Calculates if the given position should be left-justified.
GetIsRightJust   Calculates if the given position should be right-justified.
GetMaskedText   Returns a copy of the input text passed through the mask processing.
InitMaskInput   Prepares the mask processor for new input.
InsertMaskChar   Insert a character at the current position.
MovePosition   Called with appropriate Key board style parameters (VK_DOWN etc) this function will cause the process to move its current position appropriately.
MoveToPosition   Attempts to move the current mask position directly to the position specified.
ReplaceMaskChar   Replace the character after the current position.
RestoreMaskTextFrom   Used to restore the internal representation of the input string.
SaveMaskTextTo   Used to save the internal representation of the input string for restoration later if required.
SetMaskedText   Directly set the entire input string.
SetNumericSign   Used in eemNumeric mode to directly set the sign of the value being represented.
ValidateEdit   Called to validate the input against the mask.

Introduced Public Events
OnError  Provide code here to override default error processing.