Platforms to show: All Mac Windows Linux Cross-Platform
Back to DesktopNSTextViewControlMBS control.
DesktopNSTextViewControlMBS.BoundsChanged
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
DesktopNSTextViewControlMBS.clickedOnLink(Link as Variant, charIndex as Integer) as Boolean New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 24.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
link: The link that was clicked; the value of NSLinkAttributeName.
charIndex: The character index where the click occurred, indexed within the text storage.
Return true if the click was handled; otherwise, false to allow the next responder to handle it.
The event can use this method to handle the click on the link. It is invoked by clickedOnLink().
The charIndex parameter is a character index somewhere in the range of the link attribute. If the user actually physically clicked the link, then it should be the character that was originally clicked. In some cases a link may be opened indirectly or programmatically, in which case a character index somewhere in the range of the link attribute is supplied.
DesktopNSTextViewControlMBS.Closing
Type | Topic | Version |
event | Cocoa Controls | 21.5 |
The control is about to close.
In older Xojo versions, this event is named Close.
DesktopNSTextViewControlMBS.ConstructContextualMenu(base as DesktopMenuItem, x as Integer, y as Integer) As Boolean
Type | Topic | Version |
event | Cocoa Controls | 22.1 |
DesktopNSTextViewControlMBS.ContextualMenuItemSelected(selectedItem As DesktopMenuItem) As Boolean
Type | Topic | Version |
event | Cocoa Controls | 21.5 |
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.
DesktopNSTextViewControlMBS.didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 24.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Allows you to restart any animation you may have stopped in the willShowContextualMenu event.
DesktopNSTextViewControlMBS.FocusLost
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa 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.
DesktopNSTextViewControlMBS.FocusReceived
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa 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.
DesktopNSTextViewControlMBS.FrameChanged
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
This event notifies you, that the control changed it's bounding frame, which is position and/or size.
DesktopNSTextViewControlMBS.MenuBarSelected
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
The event where you can enable menu items.
In older Xojo versions, this event is named EnableMenuItems.
DesktopNSTextViewControlMBS.MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
DesktopNSTextViewControlMBS.MouseDrag(x as Integer, y as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
DesktopNSTextViewControlMBS.MouseUp(x as Integer, y as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Use the x and y parameters to determine if the mouse button was released within the control's boundaries.
DesktopNSTextViewControlMBS.Opening
Type | Topic | Version |
event | Cocoa Controls | 21.5 |
The control is about to was created and you can initialize it.
In older Xojo versions, this event is named Open.
DesktopNSTextViewControlMBS.ScaleFactorChanged(NewFactor as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Please invalidate any cached bitmaps or other relevant state.
DesktopNSTextViewControlMBS.shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
DesktopNSTextViewControlMBS.textDidBeginEditing
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
DesktopNSTextViewControlMBS.textDidChange
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
DesktopNSTextViewControlMBS.textDidEndEditing
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
DesktopNSTextViewControlMBS.textShouldBeginEditing as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
DesktopNSTextViewControlMBS.textShouldEndEditing as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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.
DesktopNSTextViewControlMBS.textViewDidChangeSelection
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
DesktopNSTextViewControlMBS.textViewWritingToolsDidEnd New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 24.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Use this method to undo any actions you took at the start of a writing tools session to modify your app’s behavior. The text view calls this method after the writing session finishes. At this point, the text view contains the final text the person chose.
DesktopNSTextViewControlMBS.textViewWritingToolsWillBegin New in 24.5
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 24.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Use this method to take any necessary steps to prepare your app for writing tools interactions. During the course of a writing tools session, the writing tools UI suggests changes to the text view’s text. It also allows the person to toggle between the original and replacement text before choosing one. To avoid issues while these changes occur, save any current data to disk and and disable features that might modify your view’s text storage while the session is active. For example, disable iCloud synchronization until the session ends. Reenable those features when the session ends.
The text view calls this method when the person requests the writing tools interface, but before the interface makes any changes to your content. Because the session isn’t active yet, the writingToolsActive property of the text view is NO while this method executes. The value of that property resolves to YES only after the method returns.
DesktopNSTextViewControlMBS.willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Cocoa Controls | MBS MacCocoa Plugin | 24.1 | ✅ Yes | ❌ No | ❌ No | ❌ No |
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 MacCocoa Plugin.