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

StdWin. ToolBarButton

ToolBarButton

Constructor

new ToolBarButton()

A ToolBarButton object

Methods

hasEllipses() → {Promise.<bool>}

Indicates whether the toolbar button's text is truncated and an ellipsis (...) is displayed. Remarks: this property is not supported for QMenuBar objects.
Returns:
a promise that is fullfilled with indication whether the toolbar item's text is truncated and an ellipsis (...) is displayed or not
Type
Promise.<bool>

index() → {Promise.<Number>}

Get the 0-based index number of the toolbar item. The index does not include hidden and separator items.
Returns:
a promise that is fullfilled with the item index.
Type
Promise.<Number>

isChecked() → {Promise.<bool>}

Indicates whether the toolbar button is a dual-state (toggle) push button and is currently selected (pushed)..
Returns:
a promise that is fullfilled with indication whether the item is checked or not.
Type
Promise.<bool>

isEnabled() → {Promise.<bool>}

Indicates whether the toolbar button is enabled.
Returns:
a promise that is fullfilled with indication whether the item is enabled or not.
Type
Promise.<bool>

isHighlighted() → {Promise.<bool>}

Indicates whether the toolbar button is highlighted (surrounded by a dotted line).
Returns:
a promise that is fullfilled with indication whether the item is highlighted or not.
Type
Promise.<bool>

isHot() → {Promise.<bool>}

Indicates whether the toolbar button is "hot". (Appears highlighted on mouseover.) Remarks: the IsHot function is not supported for QMenuBar objects.
Returns:
a promise that is fullfilled with indication whether the item is hot or not.
Type
Promise.<bool>

isIndeterminate() → {Promise.<bool>}

Indicates whether the toolbar button is disabled.
Returns:
a promise that is fullfilled with indication whether the item is disabled or not.
Type
Promise.<bool>

isMarked() → {Promise.<bool>}

Indicates whether the toolbar button is marked. The interpretation of a marked button is application dependent. Remarks: not supported for QMenuBar objects
Returns:
a promise that is fullfilled with indication whether the item is marked or not.
Type
Promise.<bool>

isPressed() → {Promise.<bool>}

Indicates whether the toolbar button is currently being clicked.
Returns:
a promise that is fullfilled with indication whether the item is pressed or not.
Type
Promise.<bool>

isWrap() → {Promise.<bool>}

Indicates whether the toolbar button is enabled and followed by a line break.
Returns:
a promise that is fullfilled with indication whether the item is wrapped or not.
Type
Promise.<bool>

name() → {Promise.<string>}

The name of the toolbar button.
Returns:
a promise that is fullfilled with the item name.
Type
Promise.<string>