To learn more about using JavaScript in LeanFT, see Setting up and working with the JavaScript SDK.
For JavaScript code samples, see Code Samples - JavaScript.

ToolBarButton

Java. ToolBarButton

ToolBarButton

Constructor

new ToolBarButton()

A ToolBarButton object

Methods

index() → {Promise.<Number>}

The 1-based index number of the toolbar button. The index does not include hidden and separator buttons.
Returns:
a promise that is fulfilled when the index operation ends.
Type
Promise.<Number>

isEnabled() → {Promise.<bool>}

Indicates whether the toolbar button accepts user input.
Returns:
* @returns {Promise} a promise that is fulfilled when the isEnabled operation ends.
Type
Promise.<bool>

isSelected() → {Promise.<bool>}

Indicates whether the toolbar button is either pressed or checked.
Remarks: A button is pressed if it is being clicked; checked if it is a toggle button that is selected.
Returns:
a promise that is fulfilled when the isSelected operation ends.
Type
Promise.<bool>

name() → {Promise.<string>}

The name of the toolbar button.
Returns:
a promise that is fulfilled when the name operation ends.
Type
Promise.<string>

press() → {Promise.<void>}

Presses this toolbar button.
Returns:
a promise that is fulfilled when the press operation ends.
Type
Promise.<void>

showDropdown() → {Promise.<void>}

Opens the dropdown menu associated with this toolbar button by clicking the arrow part of the button.
Returns:
a promise that is fulfilled when the showDropdown operation ends.
Type
Promise.<void>