Skip to main content

Interface: StatusBarItem

A status bar item is a status bar contribution that can show text and icons and run a command on click.

Properties

alignment

readonly alignment: StatusBarAlignment

The alignment of this item.

Defined in

packages/extension-api/src/extension-api.d.ts:1505


command?

optional command: string

The identifier of a command, previously registered with commands.registerCommand, to run on click.

Defined in

packages/extension-api/src/extension-api.d.ts:1533


commandArgs?

optional commandArgs: any[]

Arguments that the command handler should be invoked with.

Defined in

packages/extension-api/src/extension-api.d.ts:1538


enabled

enabled: boolean

Marks an item as disabled. When property is set to true, then icon will be changed to inactive and there won't be possible to execute a command if it is provided in the following configuration.

Defined in

packages/extension-api/src/extension-api.d.ts:1529


iconClass?

optional iconClass: string | object

Icon class that is used to display the particular icon from the Font Awesome icon set. Icon class should be in format e.g. 'fa fa-toggle-on'. It is possible to provide an icons for state which can be enabled or disabled.

Defined in

packages/extension-api/src/extension-api.d.ts:1524


priority

readonly priority: number

The priority of this item. Higher value means the item should be shown more to the left or more to the right.

Defined in

packages/extension-api/src/extension-api.d.ts:1510


text?

optional text: string

The text to show for the entry.

Defined in

packages/extension-api/src/extension-api.d.ts:1514


tooltip?

optional tooltip: string

The tooltip text when you hover over this entry.

Defined in

packages/extension-api/src/extension-api.d.ts:1518

Methods

dispose()

dispose(): void

Dispose and free associated resources. Call StatusBarItem.hide.

Returns

void

Defined in

packages/extension-api/src/extension-api.d.ts:1552


hide()

hide(): void

Hides the entry in the status bar.

Returns

void

Defined in

packages/extension-api/src/extension-api.d.ts:1546


show()

show(): void

Shows the entry in the status bar.

Returns

void

Defined in

packages/extension-api/src/extension-api.d.ts:1542