PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Reminder
  • Default input and display mask
  • In a window or in a page
  • In a report
  • Custom input masks
  • Examples
  • Note
  • Currency controls
  • Differences between the Numeric type and the Currency type
  • Currency + Euro control
  • Notes
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview

Reminder

WINDEV, WINDEV Mobile and WEBDEV propose two types of masks:
  • the input masks that define the characters that can be typed in the controls found in a window or in a page. Sometimes, these masks can also be used to modify the case (uppercase/lowercase characters) of the values assigned to the window controls or to the page controls by programming.
  • the display masks that define the characters that can be printed in the controls found in a report.
Default input and display mask

In a window or in a page

By default, the input mask corresponds to the one defined for the project: the details defined in the parameters for managing the numeric controls, the currencies, ... for the project are automatically taken into account.
Reminder: These parameters are defined for each language in the "Languages" tab of the project description ("Project .. Project description").Reminder: These parameters are defined for each language in the "Languages" tab of project description: on the "Project" pane, in the "Project" group, click "Description".
Versions 17 and later
WEBDEV - Server codeWEBDEV - Browser code In WEBDEV, you also have the ability to select HTML 5 input masks. These input masks allow you to use the HTML 5 checks to validate the input.
Caution: These masks are not supported by all browsers and they may behave differently depending on the browser used.
The following HTML 5 input masks are available:
Selected maskPurposeEffects during the input in the control
Slider (HTML 5: range)Enter a value
  • Internet Explorer 9: Not implemented.
  • Internet Explorer 11: Slider used to enter the value of the control.
  • Edge 38: Slider used to enter the value of the control.
  • FireFox 5: Not implemented.
  • Chrome 12: Slider used to enter the value of the control.
  • Opera 11.11: Slider used to enter the value of the control.
  • Safari 5: Slider used to enter the value of the control.
Spin (HTML5: number)Entering email addresses separated by a comma.
  • Internet Explorer 9: Not implemented.
  • Internet Explorer 11: Control with a spin used to automatically modify the number.
  • Edge 38: Control with a spin used to automatically modify the number.
  • FireFox 5: Not implemented.
  • Chrome 12: Control with a spin used to automatically modify the number. When exiting from the control, the incorrect characters (letters) are deleted.
  • Opera 11.11: Control with a spin used to automatically modify the number.
  • Safari 5: When validating the form, if the entered value is incorrect, the focus is set on the control.
If one of these HTML 5 masks is selected, the following information can be entered in the editor:
  • Minimum
  • Maximum
  • Step
New in version 17
WEBDEV - Server codeWEBDEV - Browser code In WEBDEV, you also have the ability to select HTML 5 input masks. These input masks allow you to use the HTML 5 checks to validate the input.
Caution: These masks are not supported by all browsers and they may behave differently depending on the browser used.
The following HTML 5 input masks are available:
Selected maskPurposeEffects during the input in the control
Slider (HTML 5: range)Enter a value
  • Internet Explorer 9: Not implemented.
  • Internet Explorer 11: Slider used to enter the value of the control.
  • Edge 38: Slider used to enter the value of the control.
  • FireFox 5: Not implemented.
  • Chrome 12: Slider used to enter the value of the control.
  • Opera 11.11: Slider used to enter the value of the control.
  • Safari 5: Slider used to enter the value of the control.
Spin (HTML5: number)Entering email addresses separated by a comma.
  • Internet Explorer 9: Not implemented.
  • Internet Explorer 11: Control with a spin used to automatically modify the number.
  • Edge 38: Control with a spin used to automatically modify the number.
  • FireFox 5: Not implemented.
  • Chrome 12: Control with a spin used to automatically modify the number. When exiting from the control, the incorrect characters (letters) are deleted.
  • Opera 11.11: Control with a spin used to automatically modify the number.
  • Safari 5: When validating the form, if the entered value is incorrect, the focus is set on the control.
If one of these HTML 5 masks is selected, the following information can be entered in the editor:
  • Minimum
  • Maximum
  • Step
WEBDEV - Server codeWEBDEV - Browser code In WEBDEV, you also have the ability to select HTML 5 input masks. These input masks allow you to use the HTML 5 checks to validate the input.
Caution: These masks are not supported by all browsers and they may behave differently depending on the browser used.
The following HTML 5 input masks are available:
Selected maskPurposeEffects during the input in the control
Slider (HTML 5: range)Enter a value
  • Internet Explorer 9: Not implemented.
  • Internet Explorer 11: Slider used to enter the value of the control.
  • Edge 38: Slider used to enter the value of the control.
  • FireFox 5: Not implemented.
  • Chrome 12: Slider used to enter the value of the control.
  • Opera 11.11: Slider used to enter the value of the control.
  • Safari 5: Slider used to enter the value of the control.
Spin (HTML5: number)Entering email addresses separated by a comma.
  • Internet Explorer 9: Not implemented.
  • Internet Explorer 11: Control with a spin used to automatically modify the number.
  • Edge 38: Control with a spin used to automatically modify the number.
  • FireFox 5: Not implemented.
  • Chrome 12: Control with a spin used to automatically modify the number. When exiting from the control, the incorrect characters (letters) are deleted.
  • Opera 11.11: Control with a spin used to automatically modify the number.
  • Safari 5: When validating the form, if the entered value is incorrect, the focus is set on the control.
If one of these HTML 5 masks is selected, the following information can be entered in the editor:
  • Minimum
  • Maximum
  • Step

In a report

By default, the input mask:
  • 999 999,99 is associated with a numeric control
  • +99 999 999,99 is associated with a currency control
  • +999 999,99 $ is associated with a Currency + Euro control
Custom input masks
For the Numeric and Currency controls, the input/display masks are defined by the following characters:
  • '9': digit,
  • '.': dot,
  • ',': comma,
  • '+': plus sign (to allow the signed numbers),
  • '-': minus sign used at the end of string to display the negative numbers. To display the "-" sign at the end of string no matter whether the number is positive or negative, specify "--".
  • ' ': space,
  • '0': on the left of the mask, in order for the number to be automatically filled with zeros (on the left),
  • '%': percentage. The value displayed (assigned by programming for example) is multiplied by 100 and the % symbol is displayed.
    To display the % symbol without multiplying by 100, all you have to do is double the % symbol (for example: "99.99%%").
    Important: in the earlier version of WINDEV 9, WEBDEV 9 or WINDEV Mobile 9 (version 90028 or earlier), if you were using the % character in your input masks, this one is automatically doubled for compatibility reasons.
    Example:
    Mask 99.99%, value entered: 19.6, value displayed: 19,6%, valued handled by programming: 0,196.
    Mask 99.99%%, value entered: 19.6, value displayed: 19,6%, valued handled by programming: 19.6.
  • '()': brackets, to display negative numbers.
Advanced custom format: You also have the ability to define:
  • the format of positive numbers
  • the format of negative numbers
  • the value if 0
  • the value if NULL
The format of this type of input/display mask is as follows:
<Format of Positive Numbers>;<Format of Negative Numbers>;<Value if 0>;<Value if NULL>
You have the ability to specify a color by using [<Color>] beside the requested mask. <Color> can correspond to:
  • one of the following constants: Red, Green, Blue, Black, White, Yellow, Orange
  • an hexadecimal value in "#BBGGRR" format.
Java The '-', '%','()' formats and the advanced custom format are not supported.
WEBDEV - Server code The custom input masks are managed in read-only: they are not available when the Web user performs an input in the control.
Versions 18 and later
WINDEVWindows Mobile Hexadecimal input mask
You also have the ability to use an hexadecimal input mask.
Several hexadecimal input masks are proposed:
  • 0xFF
  • 0xFFFF
  • 0xFFFFFFFF
  • 0xFFFFFFFFFFFFFFFF
In this case, the control allows you to enter an hexadecimal value ([0-9a-fA-F]) on n characters where n corresponds to the number of F in the mask.
New in version 18
WINDEVWindows Mobile Hexadecimal input mask
You also have the ability to use an hexadecimal input mask.
Several hexadecimal input masks are proposed:
  • 0xFF
  • 0xFFFF
  • 0xFFFFFFFF
  • 0xFFFFFFFFFFFFFFFF
In this case, the control allows you to enter an hexadecimal value ([0-9a-fA-F]) on n characters where n corresponds to the number of F in the mask.
WINDEVWindows Mobile Hexadecimal input mask
You also have the ability to use an hexadecimal input mask.
Several hexadecimal input masks are proposed:
  • 0xFF
  • 0xFFFF
  • 0xFFFFFFFF
  • 0xFFFFFFFFFFFFFFFF
In this case, the control allows you to enter an hexadecimal value ([0-9a-fA-F]) on n characters where n corresponds to the number of F in the mask.
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileUser code (UMC)

Examples

  • The '09.999, 99' mask will return a result in the following format '02.458.35'.
  • Use the "999 999,000" mask to display "0" in an empty control instead of "0,0000".
  • The '999 999-' mask will return a result in the following format '1 234-'.
  • The '(999 999)' mask will display "(1 234)" and "1 234".
  • The '999 999;-999 999[Red];0;<NULL>' mask displays '-1 234' in red.
WINDEVWEBDEV - Server codeReports and QueriesWindowsWindows MobileUser code (UMC)

Note

The display masks take into account the decimal separator, the thousand separator and the currency symbol defined for the language (in the Windows parameters). In programming, regardless of the current language:
  • the space (' ') is replaced by the thousand separator
  • the comma (',') is replaced by the decimal separator
  • the dollar ("$") is replaced by the currency symbol ($$ allows you to avoid this substitution).
Currency controls

Differences between the Numeric type and the Currency type

The masks proposed for the Currency controls have the same type as the numeric masks. The difference is found in the precision: the currencies have 17 significant digits for the integer part and up to 6 digits for the decimal part.

Currency + Euro control

The dollar character ("$") can be added into the mask to display:
  • the ' ' symbol if the current currency is the Euro.
  • the caption of the currency (defined in the exchange table by eInitCurrency) if the currency differs from the Euro.
For example: The '999,99 $' mask will display '250,25 ' if the current currency is the Euro and '250,25 GBP' if the current currency is the Pound Sterling.
Note: "$$" allows you to force the use of the symbol $.
Java If the currency is displayed in the mask, the currency used will be the one selected in the linguistic options of Windows for the runtime computer.

Notes

  • The "++++" value will be displayed in the control if the following conditions are fulfilled:
    • assignment by programming.
    • number of digits in the integer part greater than the number of digits in the integer part of the mask.
    For example, if the mask is '99.999' and if the value assigned by programming is '123456', the value "++++" will be displayed in the control.
  • The decimal part will be rounded if the following conditions are fulfilled:
    • assignment by programming.
    • number of digits in the decimal part greater than the number of digits in the decimal part of the mask.
    For example, if the mask is '99.999,99' and if the value assigned by programming is '12345,159', the value "12345,16" will be displayed in the control.
WEBDEV - Server code The "System currency" input mask corresponds to the currency mask defined in the preferences of the server.
  • assignment by programming.
  • number of digits in the integer part greater than the number of digits in the integer part of the mask.
For example, if the mask is '99.999' and if the value assigned by programming is '123456', the value "++++" will be displayed in the control.
Related Examples:
Advanced input mask Unit examples (WINDEV): Advanced input mask
[ + ] Handling the input masks in WINDEV:
- Defining the format of positive/negative number in a numeric edit control
- Defining how negative numbers will be displayed in a numeric edit control
- Defining how the value 0 will be displayed in a numeric edit control
- Using a regular expression to prevent from typing characters other than 1, 2, 3, 4, 5 and 6.
- Using a regular expression to "regulate" the input of a French registration number
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment