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 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