ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Automatic Application Features (AAF) / AAF on Edit controls
  • Overview
  • An automatic calculator
  • Operating mode
  • Implementation
  • Customizing and translating the calculator
  • Modifying the numeric value with the mouse
  • Operating mode
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
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 context 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.

Implementation

The "Calculator" option in the context 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 calculator button" in the "General" tab of the description window of the edit control.
Through programming:
  • the CalculatorButton property is used to determine and indicate whether a Numeric or Currency Edit control has a button to display a popup calculator.
  • AAFExecute associated with the aafCalculator constant is used to display the calculator below the specified edit control.
  • AAFDisable with the aafCalculator constant removes the "Calculator" option from the context menu of the specified Edit control.

Customizing and translating the calculator

The calculator is available 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. On the "Project" tab, in the "Project" group, expand "Import" and select "WINDEV elements and their dependencies".
  2. Select the subdirectory that contains the elements to import. The calculator window is located in the "Programs\Data\Preset Windows\EN\ AAF" subdirectory of the WINDEV installation directory.
  3. WINDEV lists the elements of 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.
Remarks:
  • 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 an edit control that contains numbers (numeric, currency, date, time or duration edit controls), the mouse wheel can be used to increment or decrement its value.
The increment 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 to the left of the cursor.
For example, if the cursor is positioned between the hundreds and thousands of a numeric edit control, the increment or decrement will be applied on the thousands (+ 1000 or -1000).
Remark: AAFDisable with the aafModifyInputValueWithWheel constant deletes the AAF for the specified Edit control or for all the Edit controls.
Minimum version required
  • Version 17
Comments
Click [Add] to post a comment

Last update: 08/23/2023

Send a report | Local help