showCalculator Method

Deprecated  in 4.11.0. Use showCalculator.

Show a calculator at a particular location.

showCalculator(initialValue: number, resultIcon: string, location: Readonly<WritableXAndY>, onOk: OnNumberCommitFunc, onCancel: OnCancelFunc, htmlElement?: HTMLElement): boolean

@returns true if the menu was displayed, false if the menu could not be displayed.

Parameter Type Description
initialValue number Value initially displayed in the calculator.
resultIcon string Icon displayed to the left of the value.
location Readonly<WritableXAndY> Location of the calculator, relative to the origin of htmlElement or the window.
onOk OnNumberCommitFunc Function called when the OK button or the Enter key is pressed.
onCancel OnCancelFunc Function called when the Cancel button or the Escape key is pressed.
htmlElement HTMLElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.

Returns - boolean

true if the menu was displayed, false if the menu could not be displayed.

Defined in

Last Updated: 21 November, 2024