Platforms to show: All Mac Windows Linux Cross-Platform

NSWindowMBS class

Super class: NSResponderMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The Cocoa class for a window.
// add gray layer over Xojo window. Or hide it on second call, show on third call, etc...

If view = Nil Then
// view is property in window/module

Var win As NSWindowMBS = Self.NSWindowMBS

view = New NSViewMBS(0, 0, Width, Height)


view.wantsLayer = True
view.autoresizesSubviews = True
view.autoresizingMask = view.NSViewWidthSizable + view.NSViewHeightSizable

Var layer As CALayerMBS = view.layer
layer.backgroundColor = CGColorMBS.CreateDeviceGray(0.3, 0.5)


// show or hide
view.isHidden = Not view.isHidden

End If

Subclass of the NSResponderMBS class.

Super class NSResponderMBS

Sub classes:

Some methods using this class:

Some properties using for this class:

Some events using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes

  • Version 22.1
    • Added Constructor for NSWindowMBS taking DesktopWindow.
  • Version 21.4
  • Version 20.3
    • Added performWindowDragWithEvent method to NSWindowMBS class.
    • Added SubTitle, toolbarStyle and titlebarSeparatorStyle properties to NSWindowMBS class.
  • Version 17.3

The items on this page are in the following plugins: MBS MacBase Plugin, MBS MacExtras Plugin.

NSWindowDelegateMBS   -   NSWindowRestoreHandlerMBS

The biggest plugin in space...