EditMask controls
The Mask property controls the characters the user can enter in the control and also the formatting of the characters. You must use special characters to define the mask, depending on the mask type defined with the MaskDataType property.
PocketBuilder supports four kinds of display formats:
Numbers
Strings
Dates
Times
Characters that do not have special meaning for the format appear as is in the EditMask control.
To display additional characters as part of the mask for a
decimal value, you must precede each character with a backslash.
For example, to display a decimal number with two digits of precision
preceded by four asterisks, you must type a backslash before each
asterisk: \*\*\*\*0.00
For more information about using each kind of display format, see Chapter 4, “About Display Formats and Scrolling.” For more information about defining display formats, see the User’s Guide.
To specify an edit mask:
Display the Mask tab page of the control’s Properties view.
Select the mask datatype from the MaskDataType drop-down list.
Type the mask characters in the Mask field, or click the right arrow at the end of the Mask field and select one or more of the mask character examples displayed in the pop-up menu.
The pop-up menu examples change based on the mask datatype you selected in the MaskDataType list.
The Mask property takes a string value and can be used to obtain the value of a mask. It cannot be used to set the value.
The following example uses the SetMask function to set the datatype and string format for a mask, and then uses the Mask property to obtain the value of the string format:
string ls_mask em_1.SetMask(StringMask!, '@@@,@@') ls_mask = em_1.Mask
Copyright © 2004. Sybase Inc. All rights reserved. |
![]() |