PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Numeric controls (except for the currency controls)
  • Currency controls
  • Currency + Euro controls
  • Date controls
  • Time controls
  • DateTime controls
  • Duration controls
  • Text controls in the report editor
  • Text controls in the window editor
  • Progress Bar controls
  • Type of input mask
  • Regular expressions in the input masks
  • Limits
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
..InputMask is used to:
  • find out the input mask.
  • modify the input mask (among the available masks for the type).
..InputMask applies to all controls used to type or display a text:
  • an edit control.
  • a group of edit controls.
  • an editable Combo Box.
  • a column in Table control,
  • a cell in a Table control,
  • a progress bar,
  • Versions 15 and later
    a formatted static control.
    New in version 15
    a formatted static control.
    a formatted static control.
..InputMask also applies to the Calculated controls or to the Item controls found in the reports...InputMask also applies to the Calculated controls or to the Static controls found in the reports.
Note: The input mask of a control is defined in the window or report editor, in the "General" tab of control description.
=Input mask
See Input mask for more details.
Android Custom input masks are not supported.
Versions 24 and later
Android Custom input masks are now supported.
New in version 24
Android Custom input masks are now supported.
Android Custom input masks are now supported.
Versions 16 and later
Universal Windows 10 App This property is now available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This property is now available for the Windows Phone applications.
Universal Windows 10 App This property is now available for the Windows Phone applications.
Versions 15 and later
Android This property is now available for the Android applications.
New in version 15
Android This property is now available for the Android applications.
Android This property is now available for the Android applications.
Versions 18 and later
iPhone/iPad This property is now available for reports in iPhone/iPad applications.
New in version 18
iPhone/iPad This property is now available for reports in iPhone/iPad applications.
iPhone/iPad This property is now available for reports in iPhone/iPad applications.
Versions 20 and later
WINDEV MobileAndroidiPhone/iPad This property is now available for the table columns in the Android applications and in the iPhone/iPad applications.
New in version 20
WINDEV MobileAndroidiPhone/iPad This property is now available for the table columns in the Android applications and in the iPhone/iPad applications.
WINDEV MobileAndroidiPhone/iPad This property is now available for the table columns in the Android applications and in the iPhone/iPad applications.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode for the reports and for the report controls.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode for the reports and for the report controls.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode for the reports and for the report controls.
Example
// Modify the mask of "EDT_CustomerName"
EDT_CustomerName..InputMask = maskUpper
// Modify the mask of the 1st table row for the COL_Price column
TABLE_Table1.COL_Price[1]..InputMask = "9999,99"
// The mask is taken into account by the displayed value
Info(TABLE_Table1.COL_Price[1]..DisplayedValue)
Windows Mobile
// Accepts digits from 0 to 7 (octal)
MyExpression is string = "[0-7]"
EDT_Edit1..InputMask = "regexp:" + MyExpression
// Mask for a progress bar
PROGBAR_ProgBar1..InputMask = "Performed at 999,99%"
// Allow the input of a single digit included between 1 and 6
EDT_CONTROL..InputMask = "regexp:[1-6]{0,1}"

// Allow the input of digits and dot character only,
// up to 10 characters
EDT_CONTROL..InputMask = "regexp:[0-9.]{0,10}"

// Input mask for a French registration number
EDT_REGNUM..InputMask = ...
"regexp:[A-Z]{0,2}[ \-]?[0-9]{0,3}[ \-]?[A-Z]{0,2}"

// Input mask with no size limit,
// accepting numbers as well as lowercase and uppercase letters
EDT_CONTROL..InputMask = "regexp:[0-9a-zA-Z]*"
Syntax

Finding out the input mask of a control Hide the details

<Result> = <Control name>..InputMask
<Result>: Constant or character string
Input mask of specified control. The input mask depends on the type of control. See remarks for more details.
<Control name>: Character string (with or without quotes)
Name of control to use.

Modifying the input mask of a control Hide the details

<Control name>..InputMask = <New input mask>
<Control name>: Character string (with or without quotes)
Name of control to use.
<New input mask>: Constant or character string
New input mask for the specified control. The input mask depends on the type of control. See remarks for more details.
WINDEV Mobile In the window editor, a regular expression can be used to create the mask for the edit controls and the combo boxes: to do so, use the "regexp:" string before the regular expression. See remarks for more details.
Android Custom input masks are not supported.
Versions 24 and later
Android Custom input masks are now supported.
New in version 24
Android Custom input masks are now supported.
Android Custom input masks are now supported.
Remarks

Numeric controls (except for the currency controls)

1. Preset input masks
maskFileSizeNumeric mask for the file and disk sizes.
Versions 17 and later
maskSystemNumeral
New in version 17
maskSystemNumeral
maskSystemNumeral
Numeric mask used by the system. Corresponds to the mask selected in the system regional settings ("Regional options" in the control panel).
Example:
EDT_Edit1..InputMask = maskFileSize
EDT_Edit1 = 5681234        // Displays 5,68 MB
The change of unit (from KB to MB for example) is performed for each multiple of 1024. Therefore, the mask may display 1003 KB.
2. Custom input masks
The input masks are defined via the following characters: "9", ".", ",", "+" and "-", "$" and space characters. For example: "99.999,99".
In display mode, the decimal and thousand separators as well as the symbol defined for the language are taken into account.
In programming (regardless of the language):
  • " " (space) is replaced by the thousand separator.
  • "," (comma) is replaced by the decimal separator.
  • "$" is replaced by the currency symbol (write "$$" to avoid this substitution).
Android Custom input masks are not supported.
Versions 24 and later
Android Custom input masks are now supported.
New in version 24
Android Custom input masks are now supported.
Android Custom input masks are now supported.
3. Specific custom input masks
  • Using the % symbol:
    Caution: Up to version 90028, the value assigned to the control by programming was displayed as it was, followed by the % character.
    From version 90033, the valued assigned to the control by programming is multiplied by 100 and the "%" character is displayed. To restore the operating mode of the earlier versions, write "%%" to display the % character without multiplying the value by 100.
    Example:
    • Assigning the control by programming:
      EDT_Edit1..InputMask = "999,9%"
      EDT_Edit1 = 0.562 // Displays 56,2 %

      EDT_Edit1..InputMask = "999,9%%"
      EDT_Edit1 = 0.562 // Displays 0,562 %
    • Input in the control by the user:
      • 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.
  • Using brackets: displaying the negative numbers.
    Example:
    EDT_Edit1..InputMask = "(999 999)"
    EDT_Edit1 = -1234      // Displays (1 234)
    EDT_Edit1 = 1234       // Displays 1 234
  • Using the - sign at the end of string: displaying negative numbers (ability to write "--" to display the - sign at the end of string).
    Example:
    EDT_Edit1..InputMask = "999 999 -"
    EDT_Edit1 = -1234      // Displays 1 234-
  • Multiple input mask: input mask used to define the format of positive numbers, the format of negative numbers, the value if 0 is used, the value if NULL is used. The following syntax is used:
    <Format of positive numbers>;<Format of negative numbers>;<Value if 0>;<Value if NULL>

    Example:
    EDT_Edit1..InputMask = "999 999;-999 999;0;<NULL>"
    EDT_Edit1 = -1234      // Displays - 1 234

    Note: 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.
      Example:
      EDT_Edit1..InputMask = "999 999;-999 999[Red];0;<NULL>"
      EDT_Edit1 = -1234      // Displays - 1 234 in red

      EDT_Edit1..InputMask = "999 999;-999 999[ #FF0000];0;<NULL>"
      EDT_Edit1 = -1234      // Displays - 1 234 in blue

      Note: The color specified in the input mask has priority over ..Color. It is ignored if the control is grayed.
Notes:
  • If you want the number to be filled with zeros on the left, use the "0" character on the left of the mask. For example: "099.999,99".
  • If you want the decimal part of the number to be filled with zeros, use the character "9" on the right of the decimal point. For example, when using the "9999,99000" mask, the number 12 is displayed as "12,00" and not as "12,00000".
    However, the number "12,368" is displayed properly: its value is preserved, without being truncated or rounded.
  • To force the signs, use the "+" character on the left. For example: "+9999".
  • Android Custom input masks are not supported.
    Versions 24 and later
    Android Custom input masks are now supported.
    New in version 24
    Android Custom input masks are now supported.
    Android Custom input masks are now supported.
  • Versions 18 and later
    Windows Mobile You also have the ability to specify hexadecimal input masks (between 0xF and 0xFFFFFFFFFFFFFFFFF).
    New in version 18
    Windows Mobile You also have the ability to specify hexadecimal input masks (between 0xF and 0xFFFFFFFFFFFFFFFFF).
    Windows Mobile You also have the ability to specify hexadecimal input masks (between 0xF and 0xFFFFFFFFFFFFFFFFF).

Currency controls

The input masks 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.
For example: "99 999 999 999 999 999,999999".
Versions 17 and later
Note: A preset mask can also be used for the Currency controls:
Versions 17 and later
maskSystemCurrency
New in version 17
maskSystemCurrency
maskSystemCurrency
Currency mask used by the system. Corresponds to the mask selected in the system regional settings ("Regional options" in the control panel).
New in version 17
Note: A preset mask can also be used for the Currency controls:
Versions 17 and later
maskSystemCurrency
New in version 17
maskSystemCurrency
maskSystemCurrency
Currency mask used by the system. Corresponds to the mask selected in the system regional settings ("Regional options" in the control panel).
Note: A preset mask can also be used for the Currency controls:
Versions 17 and later
maskSystemCurrency
New in version 17
maskSystemCurrency
maskSystemCurrency
Currency mask used by the system. Corresponds to the mask selected in the system regional settings ("Regional options" in the control panel).

Currency + Euro controls

The input masks have the same type as the currency masks. The dollar character ("$") can be added into the mask to display the current currency.
For example: "999,99 $" will display "250,25 F" if the current currency is the French Franc.

Date controls

The input masks for the Date controls are:
  • "DD/MM/YYYY"
  • "DD/MM/YY"
  • Versions 16 and later
    "DDD DD"
    New in version 16
    "DDD DD"
    "DDD DD"
  • "MM/DD/YYYY"
  • "MM/DD/YY"
  • "YYYY/MM/DD"
  • "YY/MM/DD"
  • "DD/MM/YYYY HH:MM:SS"
  • "MM/DD/YYYY HH:mm:SS"
  • "DD/MM/YYYY HH:mm:SS:CCC"
  • "MM/DD/YYYY HH:mm:SS:CCC"
  • "DDDD DD MMMM YYYY"
  • Versions 16 and later
    "Dddd DD Mmmm YYYY"
    New in version 16
    "Dddd DD Mmmm YYYY"
    "Dddd DD Mmmm YYYY"
  • Versions 16 and later
    "Dddd DD Mmm YYYY"
    New in version 16
    "Dddd DD Mmm YYYY"
    "Dddd DD Mmm YYYY"
  • DD (corresponding to the day of the week in digits, for example: 12)
  • "DDDD" (corresponding day of the week, "Thursday" for example). The case used depends on the linguistic options of project.
  • Versions 16 and later
    "Dddd" (corresponding to the day of the week with the first letter in uppercase, for example: Monday)
    New in version 16
    "Dddd" (corresponding to the day of the week with the first letter in uppercase, for example: Monday)
    "Dddd" (corresponding to the day of the week with the first letter in uppercase, for example: Monday)
  • Versions 16 and later
    "dddd" (corresponding to the day of the week with the first letter in lowercase, for example: monday)
    New in version 16
    "dddd" (corresponding to the day of the week with the first letter in lowercase, for example: monday)
    "dddd" (corresponding to the day of the week with the first letter in lowercase, for example: monday)
  • "DDD" (abbreviation for the day of the week, "Thu" for example). The case used depends on the linguistic options of project.
  • Versions 16 and later
    "Ddd" (abbreviation for the day of the week with the first letter in uppercase, for example: mon)
    New in version 16
    "Ddd" (abbreviation for the day of the week with the first letter in uppercase, for example: mon)
    "Ddd" (abbreviation for the day of the week with the first letter in uppercase, for example: mon)
  • Versions 16 and later
    "ddd" (abbreviation for the day of the week with the first letter in lowercase, for example: Mon)
    New in version 16
    "ddd" (abbreviation for the day of the week with the first letter in lowercase, for example: Mon)
    "ddd" (abbreviation for the day of the week with the first letter in lowercase, for example: Mon)
  • MM (month in digits, for example: 12)
  • "MMMM" (month spelled out, "January" for example). The case used depends on the linguistic options of project.
  • Versions 16 and later
    "Mmmm" (month spelled out with the first letter in uppercase, for example: January)
    New in version 16
    "Mmmm" (month spelled out with the first letter in uppercase, for example: January)
    "Mmmm" (month spelled out with the first letter in uppercase, for example: January)
  • Versions 16 and later
    "mmmm" (month spelled out with the first letter in lowercase, for example: January)
    New in version 16
    "mmmm" (month spelled out with the first letter in lowercase, for example: January)
    "mmmm" (month spelled out with the first letter in lowercase, for example: January)
  • "MMM" (abbreviation of the month, "Jan" for example). The case used depends on the linguistic options of project.
  • Versions 16 and later
    "Mmm" (abbreviation of the month with the first letter in uppercase, for example: Jan)
    New in version 16
    "Mmm" (abbreviation of the month with the first letter in uppercase, for example: Jan)
    "Mmm" (abbreviation of the month with the first letter in uppercase, for example: Jan)
  • Versions 16 and later
    "mmm" (abbreviation of the month with the first letter in lowercase, for example: jan)
    New in version 16
    "mmm" (abbreviation of the month with the first letter in lowercase, for example: jan)
    "mmm" (abbreviation of the month with the first letter in lowercase, for example: jan)
  • "YYYY" (year on four digits, "2001" for example)
  • "YY" (last two digits of the year, "01" for example)
  • the date defined by the project.
    The date defined by the project depends on the date format selected in the parameters of the project language ("Project .. Project description", "Language" tab, linguistic options about the date).The date defined by the project depends on the date format selected in the parameters of the project language:
    • on the "Project" pane, in the "Project" group, click "Description".
    • display the "Languages" tab then the linguistic options regarding the date.
These masks can be combined. For example: "Ddd DD Mmmm YYYY at HH:mm" will return a result in the following format: "Thu 01 February 1979 at 21:35".
Android Custom input masks are not supported.
Versions 24 and later
Android Custom input masks are now supported.
New in version 24
Android Custom input masks are now supported.
Android Custom input masks are now supported.

Time controls

The input masks for the time controls are:
  • "HH:MM".
  • "HH h MM".
  • "HH:MM:SS".
  • "HH:MM:SS AM": Used to manage the time in AM/PM format.
  • "HH:MM:SS:CC".
  • The preset mask corresponds to the system time. The system time depends on the mask selected in the regional system setings ("Regional options" in the control panel).
    Versions 17 and later
    maskSystemTime
    New in version 17
    maskSystemTime
    maskSystemTime
    Mask used by the system for the time.

DateTime controls

To specify a DateTime input mask, you must:
  1. Switch the type of the control (or table column) to Date ("Details" tab in the description window of the control or column).
  2. Modify the input mask of this control or column ("Details" tab of the description window of the control or column, or ..InputMask).

Duration controls

The following elements can be used to define a custom mask (case sensitive). To present the custom masks, let's take a duration equal to 0 day 04 hours 15 minutes 03 seconds and 412 thousandths of a second:
  • +1: only the most significant unit will be displayed (the number of hours in our example).
  • +2: only the two most significant units will be displayed (the number of hours and the number of minutes in our example).
    Specify '+3' or '+4' to display the three or four most significant units.
  • D: the number of days will be displayed if this number is greater than 0 (the number of days will not be displayed in our example).
  • H: the number of hours will be displayed if this number (or if the number of days) is greater than 0. If this number contains a single digit, this digit will be displayed (the number of hours will be '4' in our example).
  • HH: the number of hours will be displayed if this number (or if the number of days) is greater than 0. If this number contains a single digit, this digit will be preceded by '0' (the number of hours will be '04' in our example).
  • M: the number of minutes will be displayed if this number (or the number of days, or the number of hours) is greater than 0. If this number contains a single digit, this digit will be displayed (the number of minutes will be '15' in our example).
  • MM: the number of minutes will be displayed if this number (or the number of days, or the number of hours) is greater than 0. If this number contains a single digit, this digit will be preceded by '0' (the number of minutes will be '15' in our example).
  • S: the number of seconds will be displayed if this number (or if the number of days, or the number of hours, or the number of minutes) is greater than 0. If this number contains a single digit, this digit will be displayed (the number of seconds will be '3' in our example).
  • SS: the number of seconds will be displayed if this number (or if the number of days, or the number of hours, or the number of minutes) is greater than 0. If this number contains a single digit, this digit will be preceded by '0' (the number of seconds will be '03' in our example).
  • CC: the number of hundredths of second will be displayed (the number of hundredths of second will be '41' in our example).
  • CCC: the number of thousandths of second will be displayed (the number of thousandths of second will be '412' in our example).
Note: If the separator corresponds to the ":" character, the letter corresponding to the most significant unit will be added ('h' for hour, 'm' for minute, 's' for second, 'cs' for hundredths of a second and 'ms' for thousands of a second).
iPhone/iPadWindows MobileUniversal Windows 10 App

Text controls in the report editor

The masks defined in the report editor are as follows ("General" tab of control description):
maskUpperAll in uppercase characters.
maskLowerAll in lowercase characters.
maskFUpperFirst letter in uppercase character.
Windows Mobile

Text controls in the window editor

  • The preset masks
    These masks are defined in the window editor ("General" tab of control description).
    maskAAlphaNumLetter, then letters + digits.
    maskAAlphaNumUpperUppercase letter, then uppercase letters + digits.
    maskAddressIPv6IP addresses in IPV6 format such as: aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh:iiii:jjjj
    maskAddressIPIP address in IPV4 format (for example: 192.168.2.3).
    maskAddressMACMAC address in the following format: "aa:bb:cc:dd:ee:ff".
    maskAlphaLetters.
    maskAlphaUpperLetters in uppercase characters.
    maskAlphaNumLetters + digits.
    maskAlphaNumUpperLetters in uppercase characters + digits.
    maskNoneNo input mask.
    maskZipCodeFrench zip code (including the overseas departments): number on 5 digits.
    maskZipCodeGermanyGerman zip code.
    maskZipCodeAustraliaAustralian zip code.
    maskZipCodeAustriaAustrian zip code.
    maskZipCodeBelgiumBelgium zip code.
    maskZipCodeBrazilBrazilian zip code.
    maskZipCodeCanadaCanadian zip code.
    maskZipCodeSpainSpanish zip code.
    maskZipCodeGreeceGreek zip code.
    maskZipCodeItalyItalian zip code.
    maskZipCodeNetherlandsDutch zip code.
    maskZipCodePortugalPortuguese zip code.
    maskZipCodeSingaporeSingaporean zip code.
    maskZipCodeSwitzerlandSwiss zip code.
    maskZipCodeUKBritish zip code.
    maskZipCodeUSAmerican zip code.
    maskEmailEmail address.
    maskEmailMultipleEmail addresses separated by the ";" character.
    maskEmailRFC2822Email address checking the syntax defined in the RFC2822 and checking the top level domain when exiting from a control.
    maskEmailRFC2822MultipleEmail addresses separated by the ";" character. These email addresses check the syntax defined in RFC2822 and the top level domain in control output.
    maskFileNoFolderFile name (without its directories).
    maskPersonID_AustraliaAustralian social security number (Tax File Number - TFN).
    maskPersonID_BelgiumBelgium social security number (National number).
    maskPersonID_BrazilBrazilian social security number (Cadastro de Pessoas fisicas).
    maskPersonID_CanadaCanadian social security number (Social insurance number).
    maskPersonID_SpainSpanish social security number (Numero de identificacion de Extranjeros).
    maskPersonID_GreeceGreek social security number (Identity card).
    maskPersonID_ItalyItalian social security number (Codice fiscale).
    maskPersonID_NetherlandsDutch social security number (Sofinummer).
    maskPersonID_SingaporeSingaporean social security number (National Registration Identity Card).
    maskPersonID_UKBritish social security number (National Insurance Number).
    maskPersonID_USAmerican social security number (Social Security Number).
    maskINSEEINSEE number.
    maskINSEEKeyINSEE number + key.
    maskISBN10ISBN number on 10 digits.
    maskISBN13ISBN number on 13 digits.
    maskUpperAll in uppercase characters.
    maskLowerAll in lowercase characters.
    maskRomanNumeralRoman numeral (for example: MCMLXXIV).
    maskFileNameFile name and path.
    maskNumDigits.
    maskCardNumberAmericanExpressNumber of credit card for American Express on 15 digits.
    maskCardNumberMasterCardNumber of credit card for MasterCard on 16 digits.
    maskCardNumberVISANumber of credit card for Visa on 16 digits.
    maskBankAccountNumberBank account number according to the IBAN standard: two letters (country code) + two digits (control key) + 11 to 30 digits/letters.
    maskNumPlusDigits, '+', ' ', '.', '-', ','
    maskPatronymicLetters + Digits + Space + Quote + Dash.
    maskPatronymicUpperUppercase Letters + Digits + Space + Quote + Dash.
    maskFUpperFirst letter in uppercase character.
    maskRIBRIB number of account.
    maskSIRENSIREN number of company: number of 9 digits made of eight digits + a control code (on one digit) calculated according to the Luhn algorithm.
    maskSIRETSIRET number of company: SIREN number followed by 4 digits + a control code (on one digit) calculated according to the Luhn algorithm.
    maskPhonePhone number
    Versions 20 and later
    maskPhoneBelgium
    New in version 20
    maskPhoneBelgium
    maskPhoneBelgium
    Phone number in Belgium format (with management of dialing codes, national and international numbers).
    Android This constant is not available.
    Versions 20 and later
    maskPhoneCanada
    New in version 20
    maskPhoneCanada
    maskPhoneCanada
    Phone number in Canadian or American format (XXX CCC-CCCC or +1 XXX CCC-CCCC where XXX corresponds to the regional code and CCC-CCCC to the local number).
    Android This constant is not available.
    maskPhoneFrancePhone number in French format (10 digits, grouped by 2). For example: "04 67 69 40 23" or "36 99".
    Versions 20 and later
    maskPhoneSwitzerland
    New in version 20
    maskPhoneSwitzerland
    maskPhoneSwitzerland
    Phone number in Swiss format (0CC CCC CC CC or +41 CC CCC CC CC).
    Android This constant is not available.
    Versions 24 and later
    maskUUID128
    New in version 24
    maskUUID128
    maskUUID128
    128-bit UUID without dashes. For example: "29ea9852143a46a4842aca811e5f8597".
    Versions 24 and later
    maskUUID128WithBrace
    New in version 24
    maskUUID128WithBrace
    maskUUID128WithBrace
    128-bit UUID with braces. For example:
    "{29ea9852-143a-46a4-842a-ca811e5f8597}".
    Versions 24 and later
    maskUUID128Raw
    New in version 24
    maskUUID128Raw
    maskUUID128Raw
    128-bit UUID with dashes. For example:
    "29ea9852-143a-46a4-842a-ca811e5f8597".
    Versions 24 and later
    maskUUID256
    New in version 24
    maskUUID256
    maskUUID256
    128-bit UUID without dashes. For example:
    "c5c9b31729278ad9da1efc44c437b7d85 b57060f41e2bf4d0e112eadb77a6d0b".
  • The custom masks
    These custom masks are described with the following characters:
    • "9": Single digit
    • "C": Digit or space character
    • "L" (letter L in uppercase): Uppercase letter
    • "l" (letter L in lowercase): Lowercase letter
    • "A": Uppercase alphanumeric character
    • "a": Lowercase alphanumeric character
    • "?": Any character
Any other character is reproduced as it is. Therefore, the masks are never wrong.

Note: A numeric mask can be described in a text control. The value retrieved will be a numeric character string and not a numeric value.
For example: For a French registration number: LL 999 LL.
Windows Mobile

Progress Bar controls

In a Progress Bar control, the input mask is used to define the formatting of the text displayed in the progress bar. The mask used by default is "999,9 %". You have the ability to use the custom masks available for a Text control.

Type of input mask

Caution: A mask can be replaced by a mask of the same type. For example, the input mask of a DATE control cannot be replaced by the input mask of a TIME control.
Assigning an incorrect input mask will trigger an error message.
AndroidWindows Mobile

Regular expressions in the input masks

The regular expressions used in this property must not be the ones used in MatchRegularExpression.
In the input masks, the regular expressions are used to prevent from typing some characters or a sequence of characters.
In MatchRegularExpression, the regular expressions are used to check whether a string complies with a format.
Example: Checking whether the T1 string contains a letter and a digit:
  • with MatchRegularExpression: the regular expression used is [A-Za-z][0-9]
  • with ..InputMask: the regular expression used is [A-Za-z]{0,1}[0-9]{0,1}
Android Regular expressions in input masks are not supported.
Versions 24 and later
Android Regular expressions in input masks are now supported.
New in version 24
Android Regular expressions in input masks are now supported.
Android Regular expressions in input masks are now supported.

Limits

iPhone/iPadWindows MobileUniversal Windows 10 App In a report, ..InputMask can only be used on:
  • a calculated control,
  • a preset control,
  • an Item control.a Static control.
WINDEV Mobile In a window, ..InputMask only applies to the:
  • edit controls,
  • table columns,
  • editable combo boxes,
  • groups of edit controls,
  • table cells.
Android Custom input masks are not supported.
Versions 24 and later
Android Custom input masks are now supported.
New in version 24
Android Custom input masks are now supported.
Android Custom input masks are now supported.
Related Examples:
The regular expressions Unit examples (WINDEV): The regular expressions
[ + ] Using regular expressions with WINDEV.
Two use modes are presented for the regular expressions:
- checking the input format
- checking out different elements while respecting the input format.
This example is also used to search for a word in a string. The search can be case-sensitive or not. Possibility to take into account (or not) the start or end of string, as well as spaces (anywhere in the string, even in the sought word)
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
The regular expressions Unit examples (WINDEV Mobile): The regular expressions
[ + ] Using regular expressions with WINDEV Mobile.
It presents 2 modes for using the regular expressions:
- check the input format
- check out the different elements that match the input format.
This example is also used to search for a word in a string. The search can be case-sensitive or not. Possibility to take into account (or not) the start or end of string, as well as spaces (anywhere in the string, even in the sought word)
Minimum version required
  • Version 9
This page is also available for…
Comments
Example
IF RADIO_T007_TIPO_TELEFONE = "C" THEN
EDT_T007_TELEFONE..InputMask = "(99)99999-9999"
EDT_T007_TELEFONE..Caption = "Celular"
END

IF RADIO_T007_TIPO_TELEFONE = "R" OR RADIO_T007_TIPO_TELEFONE = "B" THEN
EDT_T007_TELEFONE..InputMask = "(99)9999-9999"
EDT_T007_TELEFONE..Caption = "Residencial"
END

IF RADIO_T007_TIPO_TELEFONE = "B" THEN
EDT_T007_TELEFONE..InputMask = "(99)9999-9999"
EDT_T007_TELEFONE..Caption = "Comercial"
END
BOLLER
02 Apr. 2019