Description
This provides an easy method for creating a numeric mask. The message is passed the number of digits to the left and right of the decimal separator and an optional template mask. This message will construct a mask, set the object's form_mask to this mask and set the object's Form_DataType to Mask_Numeric_Window.
Normally the template is not passed and the default currency template Default_Numeric_Mask is used. Default_Numeric_Mask is a global string (which you may change) which contains the default numeric template. Its default value is "*". If template is passed it should, at minimum, contain an asterisk. When the mask is constructed, the asterisk is expanded to contain the proper number of left and right digits.
Setting of this property makes it unnecessary to actually set the object's Form_DatatType to Mask_Numeric_Window.
If the object is based on Form or Entry, item# will always be zero.
Sample
This sample sets the numeric mask for item 0 to 4 digits to the left of the decimal separator and 4 digits to the right of the decimal separator.
Set Numeric_Mask 0 to 4 4
Sample
This sample sets the numeric mask for item (or column) 5 to 4 digits to the left of the decimal separator and no (0) digits to the right of the decimal separator. The number will also be followed by a percent (%) sign.
Set Numeric_Mask 5 to 4 0 "*%"
See Also
Form | Currency_Mask