Skip to content

Currency_Mask - EntryList

Provides an easy method for creating a currency mask

Type: Procedure Set

Parameters

Parameter Type Description
item# Integer
LeftDigit Integer Digits to the left of the decimal separator
RightDigit Integer Digits to the right of the decimal separator
DfltMask String The mask string to be applied. Optional and normally not passed

Syntax

Procedure Set Currency_Mask Integer item# Integer LeftDigit Integer RightDigit String DfltMask

Call Example

Set Currency_Mask item# LeftDigit RightDigit DfltMask

Description

This provides an easy method for creating a currency 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_Current_Window.

Normally the template is not passed and the default currency template Default_Currency_Mask is used. Default_Currency_Mask is a global string (which you may change). The default mask is:

(Default_Currency_Symbol + ",*;(" + Default_Currency_Symbol + ",*)"

where the Default_Currency_Symbol is obtained from the current Windows User's Regional Settings.

If a 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_DataType to Mask_Currency_Window.

If the object is based on Form or Entry, item# will always be zero.

Set Currency_Mask 0 to 6 2

Set Currency_Mask 0 to 8 2 "$,*;$,* "

See Also

Form | Numeric_mask