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
Function: The Cocoa class for a window.
Example:
// 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

Dim win As NSWindowMBS = Self.NSWindowMBS

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

win.contentView.AddSubView(view)

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

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

Else

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

End If
Notes: Subclass of the NSResponderMBS class.

Feedback, Comments & Corrections

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


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


NSWindowDelegateMBS   -   NSWindowRestoreHandlerMBS

The biggest plugin in space...




Links
MBS Xojo tutorial videos

Start Chat