Share this page

# ToolBarButton

# StdWin. ToolBarButton

ToolBarButton

# Constructor

## new ToolBarButton()

A ToolBarButton object

### Methods

## hasEllipses() → {Promise.<boolean>}

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 fulfilled with indication whether the toolbar item's text is truncated and an ellipsis (...) is displayed or not

Type
  Promise.<boolean>

## 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 fulfilled with the item index.

Type
  Promise.<number>

## isChecked() → {Promise.<boolean>}

Indicates whether the toolbar button is a dual-state (toggle) push button and is currently selected (pushed)..

##### Returns:

a promise that is fulfilled with indication whether the item is checked or not.

Type
  Promise.<boolean>

## isEnabled() → {Promise.<boolean>}

Indicates whether the toolbar button is enabled.

##### Returns:

a promise that is fulfilled with indication whether the item is enabled or not.

Type
  Promise.<boolean>

## isHighlighted() → {Promise.<boolean>}

Indicates whether the toolbar button is highlighted (surrounded by a dotted line).

##### Returns:

a promise that is fulfilled with indication whether the item is highlighted or not.

Type
  Promise.<boolean>

## isHot() → {Promise.<boolean>}

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 fulfilled with indication whether the item is hot or not.

Type
  Promise.<boolean>

## isIndeterminate() → {Promise.<boolean>}

Indicates whether the toolbar button is disabled.

##### Returns:

a promise that is fulfilled with indication whether the item is disabled or not.

Type
  Promise.<boolean>

## isMarked() → {Promise.<boolean>}

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 fulfilled with indication whether the item is marked or not.

Type
  Promise.<boolean>

## isPressed() → {Promise.<boolean>}

Indicates whether the toolbar button is currently being clicked.

##### Returns:

a promise that is fulfilled with indication whether the item is pressed or not.

Type
  Promise.<boolean>

## isSelected() → {Promise.<boolean>}

Indicates whether the toolbar button is currently pressed (currently being clicked) or checked (a dual-state push button that is currently selected).

##### Returns:

a promise that is fulfilled with an indication of whether the item is selected or not.

Type
  Promise.<boolean>

## isWrap() → {Promise.<boolean>}

Indicates whether the toolbar button is enabled and followed by a line break.

##### Returns:

a promise that is fulfilled with indication whether the item is wrapped or not.

Type
  Promise.<boolean>

## name() → {Promise.<string>}

The name of the toolbar button.

##### Returns:

a promise that is fulfilled with the item name.

Type
  Promise.<string>

## press(buttonopt) → {Promise.<void>}

Presses the specified toolbar button.

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`button` | MouseButton | <optional> | MouseButton.left | The mouse button used to press on the toolbar button.

##### Returns:

a promise that is fulfilled when the operation is performed.

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 operation ends.

Type
  Promise.<void>

Tips to improve your search results... UFT Developer JavaScript SDK Reference Version 15.0-15.0.2 UFT Developer SDK Reference All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: