Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSPanelMBS class.

NSPanelMBS.becomesKeyOnlyIfNeeded as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
whether the panel becomes the key window only when needed.

By default, this attribute is set to false, indicating that the panel becomes key as other windows do.
(Read and Write computed property)

NSPanelMBS.Constructor(x as Double, y as Double, w as Double, h as Double, styleMask as Integer, BackingStoreType as Integer, deferCreation as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The constructor to create a new Cocoa Windows.
Example
static n as NSPanelMBS

dim style as Integer = NSPanelMBS.NSClosableWindowMask + NSPanelMBS.NSTitledWindowMask + NSPanelMBS.NSUtilityWindowMask + NSPanelMBS.NSHUDWindowMask + NSPanelMBS.NSResizableWindowMask

n = new NSPanelMBS(100,100,200,200, style, NSPanelMBS.NSWindowBackingLocationDefault, false)

n.Title = "Hello World"
n.Show

x,y,w,h:
Location and size of the window's content area in screen coordinates. Note that the window server limits window position coordinates to ±16,000 and sizes to 10,000.

styleMask:
The window's style. Either it can be NSBorderlessWindowMask, or it can contain any of the options described in the constants, combined using the bitwiseOR function. Borderless windows display none of the usual peripheral elements and are generally useful only for display or caching purposes; you should normally not need to create them. Also, note that a window's style mask should include NSTitledWindowMask if it includes any of the others.

bufferingType:
Specifies how the drawing done in the window is buffered by the window device, and possible values are described in "Constants."

deferCreation:
Specifies whether the window server creates a window device for the window immediately. When true, the window server defers creating the window device until the window is moved onscreen. All display messages sent to the window or its views are postponed until the window is created, just before it's moved onscreen.

Initialized NSWindow object.

This method is the designated initializer for the NSWindow class.

Deferring the creation of the window improves launch time and minimizes the virtual memory load on the window server.

The new window creates a view to be its default content view. You can replace it with your own object by using the ContentView property.

NSPanelMBS.isFloatingPanel as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the panel is a floating panel.

True when the receiver is a floating panel, false otherwise.

By default, panels do not float above other windows. It's appropriate for an panel to float above other windows only if all of the following conditions are true:

  • It is small enough not to obscure whatever is behind it.
  • It is oriented more to the mouse than to the keyboard—that is, if it doesn't become the key window or becomes so only when needed.
  • It needs to remain visible while the user works in the application's normal windows—for example, if the user must frequently move the cursor back and forth between a normal window and the panel (such as a tool palette), or if the panel gives information relevant to the user's actions in a normal window.
  • It hides when the application is deactivated (the default behavior for panels).
(Read and Write computed property)

NSPanelMBS.worksWhenModal as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the receiver receives keyboard and mouse events even when some other window is being run modally.

True when the receiver receives keyboard and mouse events even when some other window is being run modally, false otherwise.

By default, this attribute is set to false, indicating a panel's ineligibility for events during a modal loop or session.
(Read and Write computed property)

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


The biggest plugin in space...