Class

NSToolbarItem

An item in a window’s toolbar.

Declaration

@interface NSToolbarItem : NSObject

Overview

If an NSToolbarItem has an NSSearchField instance as its view, that search field automatically has its minimum and maximum size adjusted to the system-specified standard values (currently 140 and 240 points).

Topics

Creating a toolbar item

- initWithItemIdentifier:

Initialize the receiver with a given identifier.

Managing attributes

itemIdentifier

The receiver’s identifier.

toolbar

The toolbar that is using the receiver.

label

The receiver’s label.

paletteLabel

The label that appears when the receiver is in the customization palette.

toolTip

The tooltip used when the receiver is displayed in the toolbar.

menuFormRepresentation

The receiver’s menu form representation.

tag

The receiver’s tag.

target

The receiver’s target.

action

The receiver’s action.

enabled

A Boolean value that indicates whether the receiver is enabled.

image

The image of the receiver.

view

The receiver’s view.

minSize

The receiver’s minimum size.

maxSize

The receiver’s maximum size.

Visibility priority

visibilityPriority

The receiver’s visibility priority.

Validation

- validate

This method is called by the receiver’s toolbar during validation.

autovalidates

A Boolean value that indicates whether the receiver is automatically validated by the toolbar.

Controlling duplicates

allowsDuplicatesInToolbar

A Boolean value that indicates whether the receiver can be represented in the toolbar at more than one position.

Constants

Standard Identifiers

NSToolbarItem defines the following standard toolbar item identifiers.

Relationships

Inherits From

Conforms To

See Also

Items

NSToolbarItemGroup

A group of subitems in a toolbar item.