StatusBar

Overview

The status bar acts as a consistant element in the UI that can be accessed even if all other windows are closed. It can also have status indicators as icons or text to represent the state. On OSX this creates a new icon or text label in the Status Bar area. In Windows this creates a new task tray icon.

Ancestors

  1. None
 

Descendants

  1. None
 

See Also

  1. None

Constructors

new StatusBar
Description

Creates a new status bar.

Definition

new StatusBar()

Members

enabled
Description

Gets or sets whether the status bar displays as "active" or "disabled". The disabled state grays out the icon and title, in addition it does not respond to mouse or keyboard actions.

Definition

boolean statusbar.enabled
image
Description

Gets or sets the image used in the status bar. The image is automatically resized to fit the OS requirements. An image can be a url including the app:// schema, or can be named system icon.

Definition

string statusbar.image
Description

Gets or sets the menu to display when the user clicks on the status bar. NOTE: When a menu is set the click event is ignored and the menu is opened.

Definition

Menu statusbar.menu
title
Description

Gets or sets the title of the status bar. Most status bar's do not have titles and only icons. The title should be limited to no more than 3 words as the space available is limited.

Definition

string statusbar.title
tooltip
Description

Gets or sets the text displayed when the user keeps the mouse cursor over the icon without taking any action. This can be thought of as a description as to what the status bar does.

Definition

string statusbar.tooltip

Methods

addEventListener(eventName, callback)
Description

Adds an event listener for events. The first parameter is the name of the event, the second parameter is the function to call when the event happens (e.g., a callback).

Definition

statusbar.addEventListener(eventName, callback)
Parameters
NameTypeDescription
eventName string The name of the event to start listening to.
callback function The function that will be called when it occurs.
close()
Description

Closes the status bar and removes it from operating system UI.

Definition

statusbar.close()
removeEventListener(eventName, callback)
Description

Removes an event listener for events. The first parameter is the name of the event, the second parameter is the function that was originally given as the callback for addEventListener.

Definition

statusbar.removeEventListener(eventName, callback)
Parameters
NameTypeDescription
eventName string The name of the event to stop listening to.
callback function The function that would have been called.

Events

click
Description

Fires when the user clicks on the statusbar icon, this will not fire if a menu is placed on the status bar or if a custom view is set.

Definition

statusbar.addEventListener('click', function() { ... });