String with mask

Print Previous page Top page Next page

ici_9125 The line with a mask represents the one-line editor, which in addition gives an opportunity of restriction of the entered information by a template. By means of a template (mask) it is possible to limit number of symbols entered by the user, their type (line, numerical). Besides, it is possible to insert additional symbols into the entered information (for example, dividers at entering date, time). By means of editing by a mask it is convenient to enter telephone numbers, dates, postal indices and other information of in advance certain format.

Properties of a component: Ctl3D, Height, Enabled, Dataset name, Name, Edit mask, Top, Left, Tab order, Color, Width, Font.

Edit mask - property allows to set a mask. It is a sequence of the special codes, defining for a line of editing a format of a text containing in the line. For making up a mask it is possible to use theletter.

 

 

The mask consists of three fields divided by a symbol ";". The first field is actually a mask. The second field is the symbol defining whether literal symbols are considered as a part of data. The symbol "1" is used by default, and literal symbols of a mask are a part of the text entered by the editor. If to set a symbol "0" instead of "1" literal symbols of a mask will be displayed still in a field of the editor at entering of the text into it. The third field contains a symbol used for representation of a space character in a mask, by default it is a symbol of underlining. If neither the second, nor the third fields are defined, for them values by default are used.

In a mask it is possible to apply the following special symbols:

! - the initial space characters are suppressed in the text. If a symbol ! is absent then the final space characters are suppressed.

> - symbols which follow this symbol are translated into the upper register up to occurrence of a symbol <.

<-symbols which follow this symbol are translated into the lower register up to occurrence of a symbol >.

<> - check of symbols registers is not made.

\ - the symbol following this symbol is a literal symbol.

L - the alphabetic symbol should be entered into positions.

l (lower case of latin letter L) -  an alphabetic symbol can be entered in positions.

A - the alphanumeric symbol should be entered into positions.

a - the alphanumeric symbol can be entered into positions.

C - the symbol should be entered into positions.

c - the symbol can be entered into positions.

0 - the digital symbol should be entered into positions.

9 - the digital symbol can be entered into positions.

# - the digital symbol can be entered into positions or + and -.

: - it is used for division of hours, minutes and seconds in indications of time.

/ - it is used for division of days, months and years in dates.

; - symbol divides fields of a mask.

_ - symbol reserves the empty space in a window of editing, being as automatically missed divider and into which it is impossible to enter the information.

Examples of masks:

! 99/99/00; 1; _ - to enter the date.

! 90:00; 1; _ - to indicate time.

l_l_l_l_l_l _; l; _ - to enter a word by length no more than six letters (between letters the spaces are displayed).

To prepare a mask it is possible and manually, however it is more difficult. If necessary, it is conveniently to use the Mask editor to choose a suitable mask from a file of masks (*.dem), and then to modify it. The example of a file of masks is applied together with installation of system in a directory ' \Panorama9 \DATA \PODOLSK \DataBase \rus.dem '.

Tab order - sets a serial number of a component at detour of a component by "Tab" key.