Platforms to show: All Mac Windows Linux Cross-Platform
CocoaControlMBS control Deprecated
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
control | Cocoa | MBS MacFrameworks Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This item is deprecated and should no longer be used.
The control to embed NSViews into a Xojo window.
Due the way Cocoa event handling works, the keydown event handler (and others) do not work with this control. To actually get an event, you'd have to use a subclass of CustomNSViewMBS and handle events there. In the CustomNSViewMBS you add the actual view you like to have. So all events not handled by this view, fall through to your CustomNSViewMBS.
On Carbon the RS framework intercepts events and calls keydown event.
Requires the window being composite for Carbon targets which is currently not available for modal windows in Xojo.
- 10 events
- event Close
- event ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean
- event ContextualMenuAction(hitItem as MenuItem) as Boolean
- event EnableMenuItems
- event GetView as NSViewMBS
- event MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
- event MouseDrag(x as Integer, y as Integer)
- event MouseUp(x as Integer, y as Integer)
- event Open
- event ScaleFactorChanged(NewFactor as Double)
- 3 properties
- property Available as Boolean
- property View as NSViewMBS
- property WantsFocus as Boolean
Some examples using this control:
- /MacCocoa/NSView custom focus ring
- /MacControls/Custom NSView Drop
- /MacControls/NSButton Control Array
- /MacControls/NSTextField Focus on KeyDown
- /MacControls/TextEdit MBS
- /MacControls/TextView advanced
- /MacFrameworks/Cocoa Controls/NSSearchfield with event
- /MacFrameworks/Cocoa Controls/SearchField with menu
- /MacFrameworks/CustomNSScroller/Dark scrollbar
- /MacFrameworks/QuickLook/QLPreviewViewMBS
Blog Entries
- MBS Xojo Plugins, version 22.4pr4
- MBS Xojo / Real Studio Plugins, version 15.0pr7
- MBS Xojo / Real Studio Plugins, version 13.4pr4
- MBS Xojo / Real Studio Plugins, version 13.2pr5
- MBS Real Studio Plugins, version 13.1pr16
- MBS Real Studio Plugins, version 13.0pr1
- Adding NSDatePickerMBS class.
- Using NSTextViewMBS
- MBS REALbasic plug-in 9.6
Xojo Developer Magazine
Release notes
- Version 22.4
- Deprecated CocoaControlMBS and WebViewControlMBS controls.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.