AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Máscaras de entrada y de visualización
  • Overview
  • Reminder
  • Default input and display mask
  • In a window or page
  • WEBDEV specific features
  • In a report
  • Custom input masks
  • Examples
  • Remarks
  • Currency controls
  • Differences between the Numeric type and the Currency type
  • Currency + Euro control
  • Remarks
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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 programmatically.
  • 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 page

By default, the input mask corresponds to the one defined for the project: the information defined in the Numerical, Monetary, ... management parameters for the project is automatically taken into account..
Reminder: These parameters are defined for each language in the "Languages" tab of the project description: under the "Proyecto" pane, in the "Proyecto" group, click on "Descripción".
The default input masks are as follows:
  • Numeric defined by the project.
  • File size.
  • WINDEV Bitcoin.
  • WINDEV Scientific (exponential) notation.
  • Percentage.
WEBDEV - Código ServidorWEBDEV - Código Navegador

WEBDEV specific features

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.
Please note: These masks are not supported by all browsers, and their operation may differ depending on the browser used.
The following HTML 5 input masks are available:
Selected maskPurposeEffects during the input in the control
Slider (HTML5: range)Enter a value
  • INTERNET Explorer 9: Unmanaged.
  • INTERNET Explorer 11: Slider for entering the value of the control.
  • Edge 38: Slider for entering the value of the control.
  • FireFox 5: Unmanaged.
  • Chrome 12: Slider for entering the value of the control.
  • Opera 11.11: Slider for entering the value of the control.
  • Safari 5: Slider for entering the value of the control.
Spin (HTML5: number)Entering email addresses separated by a comma.
  • INTERNET Explorer 9: Unmanaged.
  • INTERNET Explorer 11: control with Spin for automatic number modification.
  • Edge 38: control with Spin for automatic number modification.
  • FireFox 5: Unmanaged.
  • Chrome 12: control with Spin for automatic number changes. When exiting from the control, the incorrect characters (letters) are deleted.
  • Opera 11.11: control with Spin for automatic number modification.
  • Safari 5: When validating the form, if the value entered is incorrect, the focus is put 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 Numeric controls.
  • +99,999,999.99 is associated with Currency controls.
  • +999,999.99 $ is associated with Currency + Euro controls.
Custom input masks
For the Numeric and Currency controls, the input/display masks are defined by the following characters:
  • 9': number,
  • '.': period,
  • ', ': 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': to the left of the mask, so that the number is automatically completed with zeros (left),
  • '%': percentage. The value displayed (assigned through programming for example) is multiplied by 100 and the % symbol is displayed.
    To display the % sign without multiplying by 100, simply double the acronym % (example: "99.99%%")..
    Important: if in previous versions of WINDEV 9, WEBDEV 9 or WINDEV Mobile 9 (Version 90028 or earlier) you used the % character in your input masks, this character is automatically doubled for compatibility..
    Example:
    Mask 99.99%, input value: 19.6, display value: 19.6%, value manipulated by programming: 0.196.
    Mask 99.99%%, value entered: 19.6, value displayed: 19.6%, value manipulated 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 des positif>;<Format des négatifs>;<Valeur si 0>;<Valeur si NULL>
You can specify a color using [<Color>] next to the desired mask. <Color> can correspond to:
  • to one of the following constants: Red, Green, Blue, Black, White, Yellow, Orange
  • a hexadecimal value in "#BBGGRR" format.
Java The '-', '%','()' formats and the advanced custom format are not supported.
WEBDEV - Código Servidor Customized input masks are managed in display mode only: they are not available when the user enters the Edit control field.
WINDEV Hexadecimal input mask
You also have the ability to use a hexadecimal input mask.
Several hexadecimal input masks are proposed:
  • 0xFF
  • 0xFFFF
  • 0xFFFFFFFF
  • 0xFFFFFFFFFFFFFFFF
In this case, the control allows you to enter a hexadecimal value ([0-9a-fA-F]) on n characters where n corresponds to the number of F in the mask.
WINDEVWEBDEV - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (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 - Código ServidorReportes y ConsultasWindowsCódigo de Usuario (UMC)

Remarks

  • 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 with the thousand separator
    • the comma (',') is replaced with the decimal separator
    • the dollar ("$") is replaced with the currency symbol ($$ allows you to avoid this substitution).
  • Using 0 in the input mask:
    • If you want to pad the number with zeros on the left, use "0" on the left of the mask. For example, using the '099,999.99' mask on '23.50' will show '023.5'.
    • If you want to pad the decimal part of the number to with zeros, use "9" to the right of the decimal point. For example, using the '9999.000' mask on '12' will show '12.00'. The same mask used on '12,368' will show '12,368' (the value is not rounded).
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 lies in precision: the monetary units have 17 significant digits for the integer part and a maximum of 6 decimal places.

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 mask '$999.99' will display '250.25 ' if the current currency is the Euro and '250.25 GBP' if the current currency is the Pound Sterling.
Note: It's possible to write "$$" to force the use of the acronym $.
Java If the currency is displayed in the mask, the currency used will be the one selected in the language options of Windows for the runtime computer.

Remarks

  • The "++++" value will be displayed in the control if the following conditions are fulfilled:
    • assignment programmatically.
    • 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 through programming is '123456', the value "++++" will be displayed in the control.
  • The decimal part will be rounded if the following conditions are fulfilled:
    • assignment programmatically.
    • 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 through programming is '12345,159', the value "12345,16" will be displayed in the control.
WEBDEV - Código Servidor The "System currency" input mask corresponds to the currency mask defined in the preferences of the server.
  • assignment programmatically.
  • 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 through programming is '123456', the value "++++" will be displayed in the control.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 19/09/2024

Señalar un error o enviar una sugerencia | Ayuda local