Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWindowMBS class.

Previous items

NSWindowMBS.isZoomed as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
A Boolean value that indicates whether the receiver is in a zoomed state.

(Read only property)

NSWindowMBS.Left as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
Property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The horizontal position of the color panel in pixel.

(Read and Write property)

NSWindowMBS.Level as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The window level of the receiver.
Example
dim n as NSWindowMBS = window1.NSWindowMBS
n.Level = n.NSFloatingWindowLevel

(Read and Write property)

NSWindowMBS.maxSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The maximum size to which the window's frame (including its title bar) can be sized.

The maximum size to which the window's frame (including its title bar) can be sized either by the user or by the setFrame... methods other than setFrame.
(Read and Write property)

NSWindowMBS.miniwindowImage as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The custom miniaturized window image of the receiver.

The miniaturized window image is the image displayed in the Dock when the window is minimized. If you did not assign a custom image to the window, this method returns nil.

Value is declares as Variant to minimize plugin dependencies, but should be NSImageMBS.
(Read and Write property)

NSWindowMBS.miniwindowTitle as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The title displayed in the receiver's minimized window.

(Read and Write property)

NSWindowMBS.minSize as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The minimum size to which the window's frame (including its title bar) can be sized.

The minimum size to which the window's frame (including its title bar) can be sized either by the user or by the setFrame... methods other than setFrame.
(Read and Write property)

NSWindowMBS.Movable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the window can be moved by clicking in its title bar or background.

setMovableByWindowBackground, called with the argument true, is ignored by a window that returns false from isMovable. If a window returns false, that means it can only be dragged between spaces in F8 mode, and its relative screen position is always preserved. Note that a resizable window may still be resized, and the window frame may be changed programmatically. A non-movable window will not be moved or resized by the system in response to a display reconfiguration. Applications may choose to enable application-controlled window dragging after disabling user-initiating dragging by handling the mouseDown/mouseDragged/mouseUp sequence in sendEvent in an NSWindow subclass.
Available in Mac OS X v10.6 and later.
(Read and Write property)

Some examples using this property:

NSWindowMBS.parentWindow as NSWindowMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The parent window to which the window is attached as a child.

Available in Mac OS X v10.2 and later.
(Read and Write property)

NSWindowMBS.preferredBackingLocation as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The preferred location for the window's backing store.

Available in Mac OS X v10.5 and later.
(Read and Write property)

NSWindowMBS.preservesContentDuringLiveResize as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the window tries to optimize user-initiated resize operations by preserving the content of views that have not changed.

Returns true if the window tries to optimize live resize operations by preserving the content of views that have not moved; otherwise, false.

Discussion
When live-resize optimization is active, the window redraws only those views that moved (or do not support this optimization) during a live resize operation.

See preservesContentDuringLiveResize in NSView for additional information on how to support this optimization.

Available in Mac OS X v10.4 and later.
(Read and Write property)

NSWindowMBS.preventsApplicationTerminationWhenModal as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the window prevents application termination when modal.

Available in Mac OS X v10.6 and later.
(Read and Write property)

NSWindowMBS.representedFile as folderitem

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The pathname of the file the window represents.

(Read and Write property)

NSWindowMBS.representedFilename as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The pathname of the file the window represents.

(Read and Write property)

NSWindowMBS.representedURL as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The URL of the file the window represents.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.rtf")
dim n as new NSWindowMBS(window1)
n.representedURL = f.URLPath

MsgBox n.representedURL

The URL for the file the window represents.

When the URL specifies a path, the window shows an icon in its title bar, as described in Table 1.

Title bar document icon display:

FilepathDocument icon
EmptyNone.
Specifies a nonexistent fileGeneric.
Specifies an existent fileSpecific for the file's type.

You can customize the file icon in the tile bar with the following code:

window.standardWindowButton(NSWindowDocumentIconButton).Image=theImage

When the URL identifies an existing file, the window's title offers a pop-up menu showing the path components of the URL. (The user displays this menu by Command-clicking the title.) The behavior and contents of this menu can be controlled with shouldPopUpDocumentPathMenu.

Available in Mac OS X v10.5 and later.
(Read and Write property)

NSWindowMBS.resizeIncrements as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The window's resizing increments.

(Read and Write property)

NSWindowMBS.Restorable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Specifies whether the window configuration is preserved between application launches.

value: Specify true if you want the window to be preserved or false if you do not want it preserved.

Windows should be preserved between launch cycles to maintain interface continuity for the user. During subsequent launch cycles, the system tries to recreate the window and restore its configuration to the preserved state. Configuration data is updated as needed and saved automatically by the system.

If you enable preservation for a given window, you should also specify a restoration class for the window using the setRestorationClass method.
Available in OS X v10.7 and later.
(Read and Write property)

NSWindowMBS.screen as NSScreenMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the screen the window is on.

The screen where most of the window is on; nil when the window is offscreen.

When the window is partly on one screen and partly on another, the screen where most of it lies is returned.
(Read only property)

NSWindowMBS.sharingType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The level of access other processes have to the window's content.

Available in Mac OS X v10.5 and later.
(Read and Write property)

NSWindowMBS.showsResizeIndicator as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the receiver's resize indicator is visible

True to show it, false to hide it.
This method does not affect whether the receiver is resizable.
(Read and Write property)

NSWindowMBS.showsToolbarButton as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the receiver shows the toolbar control button.

True to display the toolbar control button; false to hide the button.

If the window does not have a toolbar, this method has no effect.
(Read and Write property)

Some examples using this property:

NSWindowMBS.styleMask as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The receiver's style mask, indicating what kinds of control items it displays.
Example
dim p as new IKPictureTakerMBS
p.styleMask = BitwiseAnd(p.styleMask, &hFD) // disable close button

See the information about the style mask in constants below. An NSWindow object's style is set when the object is initialized. Once set, it can't be changed.

constants:
NSBorderlessWindowMask = 0The window displays none of the usual peripheral elements. Useful only for display or caching purposes.
NSTitledWindowMask = 1The window displays a title bar.
NSClosableWindowMask = 2The window displays a close button.
NSMiniaturizableWindowMask = 4The window displays a minimize button.
NSResizableWindowMask = 8The window displays a resize control.
NSTexturedBackgroundWindowMask = 256The window displays with a metal-textured background. Additionally, the window may be moved by clicking and dragging anywhere in the window background. A bordered window with this mask gets rounded bottom corners.
(Read and Write property)

Some examples using this property:

NSWindowMBS.SubTitle as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 20.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Secondary text that may be displayed adjacent to or below the primary title depending on the configuration of the window.

A value of empty string will remove the subtitle from the window layout.
(Read and Write property)

NSWindowMBS.tabbingIdentifier as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Windows with the same tabbingIdentifier will have the ability to be tabbed together when a window is being shown.
Example
dim n as NSWindowMBS = window1.NSWindowMBS
n.tabbingIdentifier = "test"
MsgBox n.tabbingIdentifier

This allows aggregation of similiar windows. By default, the tabbingIdentifier will be generated based on inherit window properties, such as the window class name, the delegate class name, the window controller class name, and some additional state. Windows can be explicilty made to group together by using the same tabbingIdentifier.
Raises an exception when used on OS X 10.11 and older.
(Read and Write property)

NSWindowMBS.tabbingMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Get and set the tabbing mode for this window.
Example
dim n as NSWindowMBS = window1.NSWindowMBS
n.tabbingMode = n.NSWindowTabbingModeDisallowed
MsgBox str(n.tabbingMode) // shows 2

This should be set before a window is shown. The default value is NSWindowTabbingModeAutomatic. When the value is NSWindowTabbingModeAutomatic, the system will look at the userTabbingPreference and automatically tab windows together based on the tabbingIdentifier, when it is appropriate to do so.
Raises an exception when used on OS X 10.11 and older.
(Read and Write property)

NSWindowMBS.Title as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The title of the color panel window.
Example
if TargetCocoa then
dim w as new NSWindowMBS(window1)

MsgBox w.title

else
MsgBox "this sample requires Xojo Cocoa Target"
end if

(Read and Write property)

NSWindowMBS.titlebarAppearsTransparent as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 15.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether titlebar appears transparent.

When True, the titlebar doesn't draw its background, allowing all buttons to show through, and "click through" to happen. In general, this is only useful when NSFullSizeContentViewWindowMask is set.

Available on Mac OS X 10.10 and newer.
(Read and Write property)

Some examples using this property:

NSWindowMBS.titlebarSeparatorStyle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 20.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Specifies the style of separator displayed between the window's titlebar and content.

The default value is NSTitlebarSeparatorStyleAutomatic. Changing this value will override any preference made by NSSplitViewItem.
(Read and Write property)

NSWindowMBS.titleVisibility as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 14.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The title visibility.

Can be NSWindowTitleVisible, NSWindowTitleHidden or NSWindowTitleHiddenWhenActive.
Available on Mac OS X 10.10 and newer.
(Read and Write property)

NSWindowMBS.toolbarStyle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 20.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Specifies how the titlebar area of the window should appear when the window displays an NSToolbar.
Example
Dim w as NSWindowMBS = window1.NSWindowMBS
w.toolbarStyle = NSWindowMBS.NSWindowToolbarStyleUnified

(Read and Write property)

NSWindowMBS.Top as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
Property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The vertical position of the color panel in pixel.

In the Cocoa world this is the distance from the bottom of the screen.
(Read and Write property)

NSWindowMBS.viewsNeedDisplay as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Indicates whether any of the window's views need to be displayed.

(Read and Write property)

NSWindowMBS.Visible as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Whether the color panel is currently visible.

Setting to false calls Hide and setting to true calls show.
(Read only property)

NSWindowMBS.Width as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
Property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The width of the color panel in pixel.

(Read and Write property)

NSWindowMBS.windowController as NSWindowControllerMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 13.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The window's window controller.

(Read and Write property)

NSWindowMBS.windowNumber as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Provides the window number of the receiver's window device.
Example
if TargetCocoa then
dim w as new NSWindowMBS(window1)

MsgBox str(w.windowNumber)

else
MsgBox "this sample requires Xojo Cocoa Target"
end if

(Read only property)

NSWindowMBS.worksWhenModal as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Indicates whether the window is able to receive keyboard and mouse events even when some other window is being run modally.

True if the window is able to receive keyboard and mouse events even when some other window is being run modally; otherwise, false.

The NSWindow implementation of this method returns false. Only subclasses of NSPanel should override this default.
(Read only property)

Previous items

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


The biggest plugin in space...