Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Popup Calculator

The popup calculator is automatically available for numeric input if the Mask property has been defined using the C subtoken.

While the user enters numeric input in a numeric field, the popup calculator can be accessed by typing the characters +, -, * or / to start an arithmetic operation. The InvokingCalculator event occurs when the popup calculator is about to be displayed. The current value found in the numeric field is combined with the next number entered in the popup calculator's input area using the arithmetic operator typed.

While the popup calculator is displayed, pressing the +, -, * or / characters will calculate the new result and the next number can be entered. The popup calculator works identically to a "real-world" calculator and displays the previous results and the arithmetic operators. The popup window expands vertically to display up to 12 lines.

Pressing C will clear the current number entered.

Pressing = will display the new total and the popup calculator remains active.

The user can press the Return key to calculate the new total and close the calculator. The new total is then entered into the Masked Edit control. If the total exceeds the capacity of the Masked Edit control numeric field, the popup calculator is not closed.

Pressing the Escape key will close the popup calculator, preserving the original contents of the Masked Edit control. Using the mouse and clicking outside of the popup calculator has the same effect as pressing the Escape key.

As the user types characters, the events CalculatorKeyDown, CalculatorKeyPress and CalculatorKeyUp occur.

The number of displayed fractional digits can be defined using the Calculator.FracDigits property.

The maximum number of lines of intermediate results displayed by the popup calculator can be defined using the Calculator.VisibleLines property. The number of lines stored for display purposes is defined using the Calculator.Lines property. If the Calculator.VisibleLines property allows for fewer lines to be displayed than are stored (Calculator.Lines property), a vertical scrollbar is shown, which is used to scroll through the list of calculator entries.

The background and foreground colors of the popup calculator can be defined using the properties Calculator.BackColor, Calculator.ForeColor, Calculator.SelectBackColor, Calculator.SelectForeColor, Calculator.FrameColor, Calculator.TotalBackColor and Calculator.TotalForeColor.

The Rollup method can be used to close the popup calendar, popup calculator and autocomplete window.


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.