Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSWindowMBS class.

Previous items Next items

NSWindowMBS.inLiveResize as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Indicates whether the window is being resized by the user.

Available in Mac OS X v10.6 and later.

NSWindowMBS.invalidateCursorRectsForView(View as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Marks as invalid the cursor rectangles of a given NSView object in the window's view hierarchy, so they'll be set up again when the window becomes key (or immediately if the window is key).

NSWindowMBS.invalidateRestorableState

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 13.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Method that you may call to indicate that the restorable state is invalid.

At some point in the future, encodeRestorableStateWithCoder: will be called to encode the restorable state. You should not override this method.

NSWindowMBS.invalidateShadow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invalidates the window shadow so that it is recomputed based on the current window shape.

NSWindowMBS.keyDown(e as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Handles a given keyboard event that may need to be interpreted as changing the key view or triggering a keyboard equivalent.

event: The keyboard event to process.

NSWindowMBS.makeFirstResponder(r as NSResponderMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Attempts to make a given responder the first responder for the window.
Example
Var MySearchField as NSViewMBS // your control to move focus to
Var w as new NSWindowMBS(window1)
call w.makeFirstResponder(MySearchField)

responder: The responder to set as the window's first responder. nil makes the window its first responder.

Returns true when the operation is successful; otherwise, false.

If responder isn't already the first responder, this method first sends a resignFirstResponder message to the object that is the first responder. If that object refuses to resign, it remains the first responder, and this method immediately returns false. If the current first responder resigns, this method sends a becomeFirstResponder message to responder. If responder does not accept first responder status, the NSWindow object becomes first responder; in this case, the method returns true even if responder refuses first responder status.

If responder is nil, this method still sends resignFirstResponder to the current first responder. If the current first responder refuses to resign, it remains the first responder and this method immediately returns false. If the current first responder returns true from resignFirstResponder, the window is made its own first responder and this method returns true.

The Application Kit framework uses this method to alter the first responder in response to mouse-down events; you can also use it to explicitly set the first responder from within your program. The responder object is typically an NSView object in the window's view hierarchy. If this method is called explicitly, first send acceptsFirstResponder to responder, and do not call makeFirstResponder if acceptsFirstResponder returns false.

Use setInitialFirstResponder to the set the first responder to be used when the window is brought onscreen for the first time.

NSWindowMBS.makeKeyAndOrderFront

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the front of the screen list, within its level, and makes it the key window; that is, it shows the window.

More or less the same as Xojo's show command on the window class.

NSWindowMBS.makeKeyWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Makes the window the key window.

NSWindowMBS.makeMainWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Makes the window the main window.

NSWindowMBS.mergeAllWindows

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Merges all windows into one window.
Example
Var n as NSWindowMBS = window1.NSWindowMBS
n.mergeAllWindows

Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.miniaturize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method removes the receiver from the screen list and displays the minimized window in the Dock.

Some examples using this method:

NSWindowMBS.moveTabToNewWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves current tab to a new window.
Example
Var n as NSWindowMBS = window1.NSWindowMBS
n.moveTabToNewWindow

Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.orderBack

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the back of its level in the screen list, without changing either the key window or the main window.

NSWindowMBS.orderFront

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the front of its level in the screen list, without changing either the key window or the main window.

NSWindowMBS.orderFrontRegardless

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Moves the window to the front of its level, even if its application isn't active, without changing either the key window or the main window.

Normally an NSWindow object can't be moved in front of the key window unless it and the key window are in the same application. You should rarely need to invoke this method; it's designed to be used when applications are cooperating in such a way that an active application (with the key window) is using another application to display data.

Available in Mac OS X v10.0 and later.

NSWindowMBS.orderOut

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Removes the window from the screen list, which hides the window.

More or less the same as Xojo's hide command on the window class.

If the window is the key or main window, the NSWindow object immediately behind it is made key or main in its place. Calling the orderOut method causes the window to be removed from the screen, but does not cause it to be released. See the close method for information on when a window is released.

The default animation based on the window type will be used when the window is ordered out unless it has been modified by the setAnimationBehavior method.

NSWindowMBS.PerformClose

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method simulates the user clicking the close button by momentarily highlighting the button and then closing the window.

Same as if the user clicks the close button.
So if the button is disabled or closing is not permitted by the window, it will do nothing.

NSWindowMBS.performMiniaturize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method simulates the user clicking the minimize button by momentarily highlighting the button, then minimizing the window.

If the receiver doesn't have a minimize button or can't be minimized for some reason, the system emits the alert sound.

Some examples using this method:

NSWindowMBS.performWindowDragWithEvent(event as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 20.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Starts a drag based on the specified mouse-down event.

event: The original mouse-down event received by the application or a view. If you don't have a NSEvent object, please pass the one from NSApplicationMBS.currentEvent here.

Your application (or a view) can call this method after receiving and examining a mouse-down event. Upon examination of the event, a view may allow that portion of the window to start a window drag and can hand off the work to the Window Server process by calling this method. Doing so allows the window to participate in space switching and other system features.
This method returns right away, and a mouse-up event may not get sent.

NSWindowMBS.performZoom

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.4 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method simulates the user clicking the zoom box by momentarily highlighting the button and then zooming the window.

If the receiver doesn't have a zoom box or can't be zoomed for some reason, the computer beeps.

Some examples using this method:

NSWindowMBS.print

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method runs the Print panel, and if the user chooses an option other than canceling, prints the window (its frame view and all subviews).

NSWindowMBS.registerForDraggedTypes(Types() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Registers a give set of pasteboard types as the pasteboard types the window will accept as the destination of an image-dragging session.

Types: An array of the pasteboard types the window will accept as the destination of an image-dragging session.

Registering an NSWindow object for dragged types automatically makes it a candidate destination object for a dragging session. NSWindow has a default implementation for many of the methods in the NSDraggingDestination informal protocol. The default implementation forwards each message to the delegate if the delegate responds to the selector of the message. The messages forwarded this way are draggingEntered:, draggingUpdated:, draggingExited:, prepareForDragOperation:, performDragOperation:, and concludeDragOperation:.

Xojo with Cocoa target implements the methods listed above. So this method is useful to change the allowed types for the case the framework has a bug.

NSWindowMBS.removeChildWindow(win as NSWindowMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Detaches a given child window from the window.

win: The child window to detach.

See also:

Some examples using this method:

NSWindowMBS.removeChildWindow(win as window)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Detaches a given child window from the window.

win: The child window to detach.

See also:

NSWindowMBS.resetCursorRects

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Clears the window's cursor rectangles and the cursor rectangles of the NSView objects in its view hierarchy.

Invokes discardCursorRects to clear the window's cursor rectangles, then sends resetCursorRects to every NSView object in the window's view hierarchy.

This method is typically invoked by the NSApplication object when it detects that the key window's cursor rectangles are invalid. In program code, it's more efficient to invoke invalidateCursorRectsForView.

NSWindowMBS.resignKeyWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invoked automatically when the window resigns key window status; never invoke this method directly.

This method sends resignKeyWindow to the window's first responder, sends windowDidResignKey to the window's delegate, and posts an NSWindowDidResignKeyNotification to the default notification center.

NSWindowMBS.resignMainWindow

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Invoked automatically when the window resigns main window status; never invoke this method directly.

This method sends windowDidResignMain to the window's delegate and posts an NSWindowDidResignMainNotification to the default notification center.

NSWindowMBS.resizeFlags as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the flags field of the event record for the mouse-down event that initiated the resizing session.

A mask indicating which of the modifier keys was held down when the mouse-down event occurred. The flags are listed in NSEvent object's modifierFlags method description.

This method is valid only while the window is being resized

You can use this method to constrain the direction or amount of resizing. Because of its limited validity, this method should only be invoked from within an implementation of the delegate method windowWillResize.

NSWindowMBS.restoreCachedImage

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Splices the window's cached image rectangles, if any, back into its raster image (and buffer if it has one), undoing the effect of any drawing performed within those areas since they were established using cacheImageInRect.

You must invoke flushWindow after this method to guarantee proper redisplay. An NSWindow object automatically discards its cached image rectangles when it displays.

NSWindowMBS.saveFrameUsingName(s as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 15.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Saves the window's frame rectangle in the user defaults system under a given name.

With the companion method setFrameUsingName, you can save and reset an NSWindow object's frame over various launches of an application. The default is owned by the application and stored under the name "NSWindow Frame frameName". See NSUserDefaults for more information.

NSWindowMBS.selectKeyViewFollowingView(view as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Makes key the view that follows the given view.

Sends the nextValidKeyView message to referenceView and, if that message returns an NSView object, invokes makeFirstResponder with the returned object.

NSWindowMBS.selectKeyViewPrecedingView(view as NSViewMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Makes key the view that follows the given view.

Sends the nextValidKeyView message to referenceView and, if that message returns an NSView object, invokes makeFirstResponder with the returned object.

NSWindowMBS.selectNextKeyView

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method searches for a candidate next key view and, if it finds one, invokes makeFirstResponder to establish it as the first responder.

The candidate is one of the following (searched for in this order):

  • The current first responder's next valid key view, as returned by the nextValidKeyView method of NSView
  • The object designated as the window's initial first responder (using setInitialFirstResponder) if it returns true to an acceptsFirstResponder message
  • Otherwise, the initial first responder's next valid key view, which may end up being nil

NSWindowMBS.selectNextTab

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Selects next tab.
Example
Var n as NSWindowMBS = window1.NSWindowMBS
n.selectNextTab

Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.selectPreviousKeyView

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method searches for a candidate previous key view and, if it finds one, invokes makeFirstResponder to establish it as the first responder.

The candidate is one of the following (searched for in this order):

  • The current first responder's previous valid key view, as returned by the previousValidKeyView method of NSView
  • The object designated as the window's initial first responder (using setInitialFirstResponder) if it returns true to an acceptsFirstResponder message
  • Otherwise, the initial first responder's previous valid key view, which may end up being nil

NSWindowMBS.selectPreviousTab

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 16.5 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Selects previous tab.
Example
Var n as NSWindowMBS = window1.NSWindowMBS
n.selectPreviousTab

Raises an exception when used on OS X 10.11 and older.

NSWindowMBS.sendEvent(e as NSEventMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
This action method dispatches mouse and keyboard events sent to the window by the NSApplication object.

Never invoke this method directly. A right mouse-down event in a window of an inactive application is not delivered to the corresponding NSWindow object. It is instead delivered to the NSApplication object through a sendEvent: message with a window number of 0.

NSWindowMBS.setAutorecalculatesContentBorderThickness(flag as boolean, edge as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Specifies whether the window calculates the thickness of a given border automatically.

flag: If true, the window calculates the thickness of the edge automatically; if false, it does not.

edge: The border whose thickness auto-recalculation status to set:

NSMaxYEdge: Top border.
NSMinYEdge: Bottom border.

Special Considerations
Turning off a border's auto-recalculation status sets its border thickness to 0.0.

In a non-textured window calling setAutorecalculatesContentBorderThickness passing NSMaxYEdge will raise an exception. It is only valid to set the content border thickness of the top edge in a textured window.

Requires Mac OS X 10.5.

Some examples using this method:

NSWindowMBS.setBottomCornerRounded(flag as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the bottom corner to be round.

This is an undocumented function in the NSWindow class.

NSWindowMBS.setContentBorderThickness(thickness as Double, edge as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Specifies the thickness of a given border of the window.
Example
Var w as NSWindowMBS = window1.NSWindowMBS

w.setContentBorderThickness(30, w.NSMinYEdge) // bottom 30 pixel
w.setContentBorderThickness(20, w.NSMaxYEdge) // top 30 pixel. Window must be metal for this

thickness: The thickness for edge, in points.
edge: The border whose thickness to set:

NSMaxYEdge: Top border.
NSMinYEdge: Bottom border.

In a non-textured window calling setContentBorderThickness passing NSMaxYEdge will raise an exception. It is only valid to set the content border thickness of the top edge in a textured window.

The contentBorder does not include the titlebar or toolbar, so a textured window that just wants the gradient in the titlebar and toolbar should have a contentBorderThickness of 0 for NSMaxYEdge.

Requires Mac OS X 10.5.

Some examples using this method:

NSWindowMBS.setContentSize(size as NSSizeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the size of the window's content view to a given size, which is expressed in the window's base coordinate system.

This size in turn alters the size of the NSWindow object itself. Note that the window server limits window sizes to 10,000; if necessary, be sure to limit aSize relative to the frame rectangle.

NSWindowMBS.setFrame(frameRect as NSRectMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the origin and size of the window's frame rectangle according to a given frame rectangle, thereby setting its position and size onscreen.

frameRect: The frame rectangle for the window, including the title bar.

Note that the window server limits window position coordinates to ±16,000 and sizes to 10,000.

See also:

Some examples using this method:

NSWindowMBS.setFrame(frameRect as NSRectMBS, display as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 8.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the origin and size of the window's frame rectangle according to a given frame rectangle, thereby setting its position and size onscreen.

The point 0/0 is on the bottom left position of the main screen.
display: Specifies whether the window redraws the views that need to be displayed. When true the window sends a displayIfNeeded message down its view hierarchy, thus redrawing all views.

See also:

NSWindowMBS.setFrame(frameRect as NSRectMBS, display as boolean, animated as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 11.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the origin and size of the window's frame rectangle, with optional animation, according to a given frame rectangle, thereby setting its position and size onscreen.

The point 0/0 is on the bottom left position of the main screen.
If animated is true, the change is animated.

See also:

NSWindowMBS.SetFrame(left as Double, top as Double, width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the origin and size of the window's frame rectangle according to a given frame rectangle, thereby setting its position and size onscreen.

The point 0/0 is on the bottom left position of the main screen.

See also:

NSWindowMBS.setFrameAutosaveName(name as String) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 15.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the name used to automatically save the window's frame rectangle in the defaults system to a given name.

Returns true when the frame name is set successfully; false when frameName is being used as an autosave name by another NSWindow object in the application (in which case the window's old name remains in effect).

If frameName isn't the empty string (""), the window's frame is saved as a user default (as described in saveFrameUsingName) each time the frame changes.

When the window has an autosave name, its frame data is written whenever the frame rectangle changes.

If there is a frame rectangle previously stored for frameName in the user defaults, the window's frame is set to this frame rectangle. That is, when you call this method with a previously used frameName, the window picks up the previously saved setting. For example, if you call setFrameAutosaveName for a window that is already onscreen, this method could cause the window to move to a different screen location. For this reason, it is generally better to call this method before the window is visible on screen.

Keep in mind that a window controller may change the window's position when it displays it if window cascading is turned on. To preclude the window controller from changing a window's position from the one saved in the defaults system, you must send setShouldCascadeWindows(false) to the window controller.

NSWindowMBS.setFrameFromString(s as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 15.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the window's frame rectangle from a given string representation.

If the window is not resizable, this method will not resize the window. The frame is constrained according to the window's minimum and maximum size settings. This method can cause a windowWillResize event.

NSWindowMBS.setFrameOrigin(point as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Positions the bottom-left corner of the window's frame rectangle at a given point in screen coordinates.

Note that the window server limits window position coordinates to ±16,000.

NSWindowMBS.setFrameTopLeftPoint(point as NSPointMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.6 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Positions the top-left corner of the window's frame rectangle at a given point in screen coordinates.

Note that the window server limits window position coordinates to ±16,000; if necessary, adjust aPoint relative to the window's lower-left corner to account for this limit.

NSWindowMBS.setFrameUsingName(name as String, force as boolean = false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 15.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Sets the window's frame rectangle by reading the rectangle data stored under a given name from the defaults system.

Returns true when frameName is read and the frame is set successfully; otherwise, false.

The frame is constrained according to the window's minimum and maximum size settings. This method causes a windowWillResize event.

Previous items Next items

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


The biggest plugin in space...