Online Documentation - Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchy
New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1
The list of the topics, classes, interfaces, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSToolbarMBS class.
NSToolbarMBS.Constructor(Handle as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 21.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Useful if you get a NSToolbar reference from a declare.
The object is retained.
See also:
NSToolbarMBS.Constructor(Identifier as string)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Initializes a newly allocated toolbar with the specified identifier.
identifier is never seen by users and should not be localized.
See also:
NSToolbarMBS.insertItemWithItemIdentifier(identifier as string, atIndex as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Identifier: The identifier of the item to insert.
index: The index at which to insert the item.
If the toolbar needs a new instance, it will get it from itemForItemIdentifier. Typically, you should not call this method; you should let the user reconfigure the toolbar.
NSToolbarMBS.items as NSToolbarItemMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSToolbarMBS.removeItemAtIndex(index as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Typically, you should not call this method; you should let the user reconfigure the toolbar.
Index is zero based.
NSToolbarMBS.runCustomizationPalette
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSToolbarMBS.validateVisibleItems
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
You typically use this method by overriding it in a subclass. The default implementation of this method iterates through the list of visible items, sending each a validate message. Override it and call super if you want to know when this method is called.
In Mac OS X v 10.6 and later toolbars no longer automatically validate for some events, including: NSLeftMouseDragged, NSRightMouseDragged, NSOtherMouseDragged, NSMouseEntered, NSMouseExited, NSScrollWheel, NSCursorUpdate, NSKeyDown. In addition, validation for NSKeyUp and NSFlagsChanged events is deferred with the timer restarting for every new deferrable event. So a sequence of key events will not trigger any validation at all, until either a pause of .85 seconds, or an event other than NSKeyUp or NSFlagsChanged is processed. This change was made as an optimization.
To trigger validation for a single toolbar manually, send the toolbar a validateVisibleItems message. To trigger validation for all toolbars, invoke NSApplication's setWindowsNeedUpdate passing true.
NSToolbarMBS.visibleItems as NSToolbarItemMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Toolbar | MBS MacControls Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Items in the overflow menu are not considered visible.
The items on this page are in the following plugins: MBS MacControls Plugin.