Class

NSStatusItem

An individual element displayed in the system menu bar.

Declaration

@interface NSStatusItem : NSObject

Overview

The NSStatusBar method statusItemWithLength: creates instances of this class and automatically adds them to the menu bar. Use the button property to customize the appearance and behavior of the status item.

Topics

Getting the Item’s Status Bar

statusBar

The status bar that displays the status item.

Managing the Status Item’s Behavior

behavior

The set of allowed behaviors for the status item.

NSStatusItemBehavior

A set of optional status item behaviors.

button

The button displayed in the status bar.

menu

The pull-down menu displayed when the user clicks the status item.

Configuring the Status Item’s Appearance

visible

A Boolean value indicating if the menu bar currently displays the status item.

length

The amount of space in the status bar that should be allocated to the status item.

NSSquareStatusItemLength

A status item length that is equal to the status bar’s thickness.

NSVariableStatusItemLength

A status item length that dynamically adjusts to the width of its contents.

Setting the Autosave Name

autosaveName

A unique name for saving and restoring information about a status item.

Deprecated

enabled

A Boolean that indicates whether the status item is enabled to respond to clicks.

Deprecated
target

The target object to which the status item’s action message is sent when the status item is clicked.

Deprecated
action

The selector that is sent to the status item’s target when the status item is clicked.

Deprecated
doubleAction

The selector that is sent to the status item’s target when the status item is double-clicked.

Deprecated
- sendActionOn:

Sets the conditions on which the status item sends action messages to its target.

Deprecated
- popUpStatusItemMenu:

Displays a menu under a custom status bar item.

Deprecated
title

The string that is displayed at the status item’s position in the status bar.

Deprecated
attributedTitle

The attributed string that is displayed at the status item’s position in the status bar.

Deprecated
image

The image that is displayed at the status item’s position in the status bar.

Deprecated
alternateImage

The alternate image to be displayed when a status bar item is highlighted.

Deprecated
highlightMode

A Boolean that indicates whether the status item is highlighted when it is clicked.

Deprecated
toolTip

The tool tip string that is displayed when the cursor pauses over the status item.

Deprecated
view

The custom view that is displayed at the status item’s position in the status bar.

Deprecated
- drawStatusBarBackgroundInRect:withHighlight:

Draws the menu background pattern for a custom status-bar item in regular or highlight pattern.

Deprecated

Relationships

Inherits From

See Also

Menu Bar Items

NSStatusBar

An object that manages a collection of status items displayed within the system-wide menu bar.

NSStatusBarButton

The appearance and behavior of an item in the systemwide menu bar.