PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 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.

Implementation

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:
  • ..CalculatorButton is used to find out and specify whether a Numeric or Currency edit control proposes a button to display a popup calculator.
  • ExecuteAAF associated with the aafCalculator constant is used to display the calculator below the specified edit control. AAFExecute (or ExecuteAAF) associated with the aafCalculator constant is used to display the calculator below the specified edit control.
  • DisableAAF associated with the aafCalculator constant deletes the "Calculator" option from the popup menu of the specified edit control. AAFDisable (or DisableAAF) associated with the aafCalculator 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 "Project" pane, in the "Project" group, expand "Import" 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.
Notes:
  • 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:
_EVE.Return = 0
Note: DisableAAF associated with the aafModifyInputValueWithWheel constant deletes the AAF for the specified numeric edit control or for all the numeric edit controls.Note: AAFDisable (or DisableAAF) associated with the aafModifyInputValueWithWheel constant deletes the AAF for the specified numeric edit control or for all the numeric edit controls.
Minimum required version
  • Version 17
Comments
Click [Add] to post a comment