• Overview
  • An automatic calculator
  • Operating mode
  • Implementation
  • Customizing and translating the calculator
  • Modifying the numeric value with the mouse
  • Operating mode
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

The numeric edit controls propose several AAFs (Automatic Application Features):

An automatic calculator

Operating mode

Any numeric control automatically proposes a "Calculator" option in its popup menu. This option displays a calculator, initialized with the value found in the edit control. This calculator is used to perform a calculation and to assign the result of this calculation to the content of the control.


The "Calculator" option found in the popup menu of the numeric edit controls is automatic.

You also have the ability to display a "Calculator" button on the right of the input area of the control. To do so, check "Display the calculator button" in the "General" tab of the description window of the edit control.

By programming:

  • ..计算器按钮 is used to find out and specify whether a Numeric or Currency edit control proposes a button to display a popup calculator.
  • 执行应用程序自动功能 associated with the 应用程序自动功能.计算器 constant is used to display the calculator below the specified edit control.
  • 禁用应用程序自动功能 associated with the 应用程序自动功能.计算器 constant deletes the "Calculator" option from the popup menu of the specified edit control.

Customizing and translating the calculator

The calculator is supplied in English and in French. It uses a skin template that can be used with all types of applications.

WinDev gives you the ability to include the calculator window used by the AAF in your application. You will have the ability to customize:

  • the appearance of this window (modification of skin template for example)
  • the languages supported by this window. This feature is very useful when translating this window into the different languages proposed by the application.
To include the calculator window in your application:
  1. Select "File .. Import .. WinDev elements and their dependencies".On the "项目" pane, in the "项目" group, expand "导入" and select "WinDev elements and their dependencies".
  2. Select the sub-directory containing the elements to import. The calculator window is found in the "Programs\Data\Preset windows\AAF" sub-directory of the setup directory of WinDev.
  3. WinDev lists the elements found in the directory. This directory contains the different elements corresponding to the customizable AAFs. The window to import is named "WinDevAaf_Calculator.wdw".
  4. Validate. The window is included in the project and it can be modified. This custom window will be automatically taken into account when running the application.


  • The window must not be renamed.
  • If this window is included in your application, you may not benefit from the improvements made to this window during the different updates. Don't forget to check whether this window has evolved.
  • Caution: To modify this window, the corresponding file must not be read-only. Modify the characteristics of the file in Windows if necessary.

Modifying the numeric value with the mouse

Operating mode

When the cursor is positioned in a numeric control (or in a currency control), the mouse wheel is used to increment or decrement its value.

The increment step is set to 1 by default: when the value is selected in the control, each action performed on the wheel modifies the value by 1.

If the cursor is positioned in the value, the increment or decrement operation will be performed on the digit found on the left of the cursor.

For example, if the cursor is positioned between the hundreds and the thousands, the increment or decrement operation will be performed on the thousands (+ 1000 or -1000).

To disable this mode:
  1. In the processes associated with the edit control, add the optional "Mouse wheel" process.
  2. In the "Mouse wheel" process, add the following code:
Note: 禁用应用程序自动功能 associated with the 应用程序自动功能.随轮盘修改输入值 constant deletes the AAF for the specified numeric edit control or for all the numeric edit controls.