showToolbar Method

Show a Toolbar at a particular location.

showToolbar(toolbarProps: AbstractToolbarProps, location: Readonly<WritableXAndY>, offset: Readonly<WritableXAndY>, onItemExecuted: OnItemExecutedFunc, onCancel: OnCancelFunc, relativePosition?: RelativePosition, htmlElement?: HTMLElement): boolean

Parameter Type Description
toolbarProps AbstractToolbarProps Properties of the Toolbar to display.
location Readonly<WritableXAndY> Location of the Toolbar, relative to the origin of htmlElement or the overall window.
offset Readonly<WritableXAndY> Offset of the Toolbar from the location.
onItemExecuted OnItemExecutedFunc Function invoked after a Toolbar item is executed
onCancel OnCancelFunc Function invoked when the Escape key is pressed or a click occurs outside the Toolbar
relativePosition RelativePosition Position relative to the given location. Defaults to TopRight.
htmlElement HTMLElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.

Returns - boolean

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

Defined in

Last Updated: 12 June, 2024