Instance Property

allowsUserCustomization

A Boolean value that indicates whether users are allowed to modify the toolbar.

Declaration

var allowsUserCustomization: Bool { get set }

Discussion

true if users are allowed to modify the toolbar; otherwise, false. If the value is false, then the Customize Toolbar… menu item is disabled and other modification is disabled. This attribute does not affect the user’s ability to show or hide the toolbar.

This value can be changed at any time. For instance, you may not want users to be able to customize the toolbar while some event is being processed. If you set the toolbar to allow customization, be sure to also set the toolbar to autosave its configuration so the user’s changes persist.

The default is false.

See Also

Toolbar Attributes

var identifier: NSToolbar.Identifier

The receiver’s identifier.

var displayMode: NSToolbar.DisplayMode

The toolbar’s display mode.

var showsBaselineSeparator: Bool

A Boolean value that indicates whether the toolbar shows the separator between the toolbar and the main window contents.

var allowsExtensionItems: Bool

A Boolean value that indicates whether the toolbar can add items for Action extensions.

var items: [NSToolbarItem]

An array containing the toolbar’s current items, in order.

var visibleItems: [NSToolbarItem]?

An array containing the toolbar’s currently visible items.

var sizeMode: NSToolbar.SizeMode

The toolbar’s size mode.