The WinCalcManager™ Assembly is a non-visual component that extends the capabilities of all controls on a form. To implement formulas on your form, drag the UltraCalcManager component from the Toolbox onto your form. Once this is done, almost all of the controls on the form will have a new property called CalcSettings . Some controls (like the WinGrid) support special handling of formulas, and will not show the CalcSettings property. These controls handle formulas in other ways. For example, WinGrid has a Formula property on the Column and SummarySettings objects. CalcSettings is of type UltraCalcSettings which has the following properties:
The following image demonstrates the WinTextEditor control on a form with its properties extended by the CalcManager component.
To add formulas to an element, set the PropertyName, and then simply click the ellipses button on the Formula property to invoke the Formula Builder.
Once the Formula Builder is displayed, the left column displays 2 tabs. The first tab lists the elements on the form that can be used in a formula, along with any custom NamedReferences. The second tab lists all of the formulas that can be used.
To create a formula, simply double-click the name of an element on the first tab, or drag-and-drop the element name in the list to the formula editor. Use the formula editor’s toolbar to add basic math symbols to your calculation. As you modify the formula in the formula editor, the formula is being checked for syntax errors in the background. If a formula entered is invalid, then you will be notified of the column and line number where you need to make the change.