Skip to main content

TcxDBCalcEdit Class

Represents a data-aware control that enables editing a value via a popup calculator.

Declaration

TcxDBCalcEdit = class(
    TcxCustomCalcEdit
)

Remarks

Use the TcxDBCalcEdit control to edit the contents of a numerical dataset field via a popup calculator. The following image demonstrates two calculator editors painted in the default and native styles accordingly.

Pressing the Enter key in the dropdown calculator evaluates the last operation and closes the dropdown window. If the dropdown window is opened, pressing the Esc key closes it but the last operation is not calculated in this case. While editing a value in the edit box of your control, you can press the Esc key to discard the value changes made and revert to the original value.

In order to connect a data-aware control to a dataset, it is necessary to set the DataSource and DataField properties of the DataBinding object.

The adjustment of different calculator settings and style properties is the same as for the TcxCalcEdit control. Use the Properties and style (the Style, StyleDisabled, StyleFocused and StyleHot) members to specify the behavior and look & feel of the calculator editor. The PopupBorderStyle property of the style members allows you to define the look & feel of the calculator itself. Working with styles is discussed in the TcxCustomEditStyle class topic.

See Also