AMT Help Files

Maskeditbox

Description:

A single line edit box where a mask is used to control the allowed user input.

Mask:

A mask must be defined to control the allowed user input. Default there are three mask characters allowed.

During input in the Maskeditbox the input characters will be checked with the allowed values and rejected when outside the allowed values.

Examples:

Note: The mask characters that are allowed can be set in the MaskDefinitions of the Application options.

IncludeLiterals:

When the property IncludeLiterals is set to True, the input value will be returned in the code exactly as shown in the Maskeditbox, e.g. "(555) 126-8328" for the US phone number. When set to False only the input characters will be returned, i.e. "5551268328" for the phone number.

Dynamic Mask:

Masks can be changed dynamically in the code through the .mask property of the Maskeditbox. E.g.

Maskedit_10.mask := '(99-AA-99)'


Note: If the mask of a maskeditbox which already holds a value is changed dynamically, any characters which are no longer allowed by the new mask will be displayed as placeholder characters.


Placeholder:

A single character to show in the Maskeditbox at the places of the editable characters in the displayed mask.
It is important that the placeholder character may not be used in the mask definition, please keep this in mind when choosing a placeholder character.

ClearEmpty:

When set to True, the Maskeditbox will show empty when no input has been entered and the Maskeditbox is not selected. When selected the input mask will show.

When set to False, the mask will be shown in all situations.


Setting the Value directly in the Code

It is possible to set the value of a Maskeditbox object directly in the code (e.g. Maskedit_10 := '(42-BX-05)'). Be aware that when setting the value in the code the mask will not be applied to the assigned value and values can be set that are not allowed by the mask without any warning or error message (e.g. Maskedit_10 := 'NotCorrect' when the mask is '(99-AA-99)' ).

Toolbar button icon:

 

Properties:

 

Events:

 

Dynamic properties: