Platforms to show: All Mac Windows Linux Cross-Platform
NSSearchToolbarItemMBS class
Super class: NSToolbarItemMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| class | Cocoa Toolbar | MBS MacControls Plugin | 24.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSSearchToolbarItem automatically resizes to accommodate typing when the focus switches to the toolbar item. When the toolbar is low on space, the system may collapse the search item into a button representation, which then expands to a full search field when the user clicks on it.
Requires macOS 11.0
Subclass of the NSToolbarItemMBS class.
- 4 properties
- property preferredWidthForSearchField as Double
- property resignsFirstResponderWithCancel as Boolean
- property searchField as NSSearchFieldMBS
- property view as NSViewMBS Private
- 3 methods
- method beginSearchInteraction
- method Constructor(itemIdentifier as string)
- method endSearchInteraction
Super class NSToolbarItemMBS
- 24 properties
- property allowsDuplicatesInToolbar as boolean
- property autovalidates as boolean
- property backgroundTintColor as NSColorMBS
- property Bordered as Boolean
- property ClassName as String
- property ClassPath as String
- property Enabled as boolean
- property Handle as Integer
- property Hidden as Boolean
- property image as NSImageMBS
- property itemIdentifier as string
- property label as string
- property MaxSize as NSSizeMBS
- property menuFormRepresentation as NSMenuItemMBS
- property MinSize as NSSizeMBS
- property Navigational as Boolean
- property paletteLabel as string
- property Style as integer
- property tag as Integer
- property Title as String
- property toolbar as NSToolbarMBS
- property toolTip as string
- property view as NSViewMBS
- property visibilityPriority as Integer
- 6 methods
- method Constructor(Handle as Integer)
- method Constructor(itemIdentifier as string)
- method copy as NSToolbarItemMBS
- method possibleLabels as String()
- method setPossibleLabels(Labels() as String)
- method validate
- 13 shared methods
- shared method NSToolbarCloudSharingItemIdentifier as string
- shared method NSToolbarCustomizeToolbarItemIdentifier as string
- shared method NSToolbarFlexibleSpaceItemIdentifier as string
- shared method NSToolbarInspectorTrackingSeparatorItemIdentifier as string
- shared method NSToolbarPrintItemIdentifier as string
- shared method NSToolbarSeparatorItemIdentifier as string
- shared method NSToolbarShowColorsItemIdentifier as string
- shared method NSToolbarShowFontsItemIdentifier as string
- shared method NSToolbarSidebarTrackingSeparatorItemIdentifier as string
- shared method NSToolbarSpaceItemIdentifier as string
- shared method NSToolbarToggleInspectorItemIdentifier as string
- shared method NSToolbarToggleSidebarItemIdentifier as string
- shared method NSToolbarWritingToolsItemIdentifier as string
- 6 constants
Constants
| Constant | Value | Description |
|---|---|---|
| NSToolbarItemVisibilityPriorityHigh | 1000 | One of the visibility priority constants. When a toolbar does not have enough space to fit all its items, it must push some items into the overflow menu. These values allow you to suggest a priority for a toolbar item. more |
| NSToolbarItemVisibilityPriorityLow | -1000 | One of the visibility priority constants. When a toolbar does not have enough space to fit all its items, it must push some items into the overflow menu. These values allow you to suggest a priority for a toolbar item. more |
| NSToolbarItemVisibilityPriorityStandard | 0 | One of the visibility priority constants. When a toolbar does not have enough space to fit all its items, it must push some items into the overflow menu. These values allow you to suggest a priority for a toolbar item. more |
| NSToolbarItemVisibilityPriorityUser | 2000 | One of the visibility priority constants. When a toolbar does not have enough space to fit all its items, it must push some items into the overflow menu. These values allow you to suggest a priority for a toolbar item. more |
Styles
| Constant | Value | Description |
|---|---|---|
| NSToolbarItemStylePlain | 0 |
A plain style maintains the item’s standard appearance. |
| NSToolbarItemStyleProminent | 1 |
For macOS 26 or newer. |
This class has no sub classes.
Blog Entries
- News from the MBS Xojo Plugins in version 24.5
- MonkeyBread Software Releases the MBS Xojo Plugins in version 24.5
- MBS Xojo Plugins, version 24.5pr7
Xojo Developer Magazine
Release notes
- Version 24.5
- Added NSSearchToolbarItemMBS class.
Some related classes:
- class NSColorMBS
- class NSImageMBS
- class NSMenuItemMBS
- class NSSearchFieldMBS
- class NSSizeMBS
- class NSToolbarItemMBS
- class NSToolbarMBS
- class NSViewMBS
The items on this page are in the following plugins: MBS MacControls Plugin.
NSSearchFieldMBS - NSSecureTextFieldMBS