Platforms to show: All Mac Windows Linux Cross-Platform

Back to DesktopOSAScriptControlMBS control.

DesktopOSAScriptControlMBS.BoundsChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The event called when the bounds, but not the frame, changed.

DesktopOSAScriptControlMBS.Closing

Type Topic Version
event Apple Script 21.5

The control is about to close.
In older Xojo versions, this event is named Close.

DesktopOSAScriptControlMBS.ConstructContextualMenu(base as DesktopMenuItem, x as Integer, y as Integer) As Boolean

Type Topic Version
event Apple Script 22.1
This event is called when it is appropriate to display a contextual menu for the control.

DesktopOSAScriptControlMBS.ContextualMenuItemSelected(selectedItem As DesktopMenuItem) As Boolean

Type Topic Version
event Apple Script 21.5
Called when a menuitem is choosen.

This allows the control to react on its relevant menu items. Please return true if you handled it or false to give others a chance.

DesktopOSAScriptControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No
Did close contextual menu.

Allows you to restart any animation you may have stopped in the willShowContextualMenu event.

DesktopOSAScriptControlMBS.FocusLost

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No

The control lost focus.
In older Xojo versions, this event is named LostFocus.

This only fires if the control itself lost focus and not a sub control.

DesktopOSAScriptControlMBS.FocusReceived

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No

The control itself got focus.
In older Xojo versions, this event is named GotFocus.

This only fires if the control itself got focus and not a sub control.

DesktopOSAScriptControlMBS.FrameChanged

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The event called when the frame changed.

This event notifies you, that the control changed it's bounding frame, which is position and/or size.

DesktopOSAScriptControlMBS.MenuBarSelected

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No

The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.

DesktopOSAScriptControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was pressed inside the control’s region at the location passed in to x, y.

The coordinates x and y are local to the control, i.e. they represent the position of the mouse click relative to the upper-left corner or the Control.
Return True if you are going to handle the MouseDown. In such a case:

  • The Action event, if any, will not execute and the state of the object will not change.
  • You will receive the MouseDrag and MouseUp events.
If you return False, the system handles the MouseDown so the above event handlers do not get called.

DesktopOSAScriptControlMBS.MouseDrag(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
This event fires continuously after the mouse button was pressed inside the Control.

Mouse location is local to the control passed in to x, y.
As this event is fired continuously (hundreds of time per second), it is your responsibility to determine if the mouse has really moved.

DesktopOSAScriptControlMBS.MouseUp(x as Integer, y as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The mouse button was released.

Use the x and y parameters to determine if the mouse button was released within the control's boundaries.

DesktopOSAScriptControlMBS.Opening

Type Topic Version
event Apple Script 21.5

The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.

DesktopOSAScriptControlMBS.ScaleFactorChanged(NewFactor as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
The backing store scale factor has changed.

Please invalidate any cached bitmaps or other relevant state.

DesktopOSAScriptControlMBS.shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Sent when a text view needs to determine if text in a specified range should be changed.

affectedCharRange: The range of characters to be replaced.
replacementString: The characters that will replace the characters in affectedCharRange; nil if only text attributes are being changed.

Return true to allow the replacement, or false to reject the change.

DesktopOSAScriptControlMBS.textDidBeginEditing

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Informs you that the text object has begun editing (that the user has begun changing it).

DesktopOSAScriptControlMBS.textDidChange

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Informs you that the text object has changed its characters or formatting attributes.

DesktopOSAScriptControlMBS.textDidEndEditing

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Informs you that the text object has finished editing (that it has resigned first responder status).

DesktopOSAScriptControlMBS.textShouldBeginEditing as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Invoked when a text object begins to change its text, this method requests permission to begin editing.

If the delegate returns false, the text object proceeds to make changes. If the delegate returns true, the text object abandons the editing operation. This method is also invoked when the user drags and drops a file onto the text object.

DesktopOSAScriptControlMBS.textShouldEndEditing as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Invoked from a text object's implementation of resignFirstResponder, this method requests permission to end editing.

If the delegate returns false, the text object proceeds to finish editing and resign first responder status. If the delegate returns true, the text object selects all of its text and remains the first responder.

DesktopOSAScriptControlMBS.textViewDidChangeSelection

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 21.5 ✅ Yes ❌ No ❌ No ❌ No
Sent when the selection changes in the text view.

DesktopOSAScriptControlMBS.willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
event Apple Script MBS MacExtras Plugin 24.1 ✅ Yes ❌ No ❌ No ❌ No
Will show contextual menu.

Your chance to modify the menu before it is shown, e.g. to add menu entries.

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


The biggest plugin in space...