Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSTextViewMBS class.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Some examples using this method:
NSTextViewMBS.breakUndoCoalescing
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method should be invoked when saving the receiver's contents to preserve proper tracking of unsaved changes and the document's dirty state.
NSTextViewMBS.changeAttributes
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method changes the attributes by invoking convertAttributes: on sender and applying the returned attributes to the appropriate text. See the NSFontManager class reference for more information on attribute conversion.
Available in Mac OS X v10.3 and later.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSTextViewMBS.changeDocumentBackgroundColor
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method gets the new color by sending a color message to sender.
This will only set the background color if allowsDocumentBackgroundColorChangereturns true.
NSTextViewMBS.checkTextInDocument
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available in Mac OS X v10.6 and later.
NSTextViewMBS.checkTextInSelection
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available in Mac OS X v10.6 and later.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
By default invoked using the Escape key, this method provides users with a choice of completions for the word currently being typed. May be invoked programmatically if autocompletion is desired by a client of the text system. You can change the key invoking this method using the text system's key bindings mechanism; see "Text System Defaults and Key Bindings" for an explanation of the procedure (on Apple website).
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
NSTextViewMBS.Constructor(Handle as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 10.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The handle is casted to a NSTextView and the plugin retains this handle.
See also:
NSTextViewMBS.Constructor(left as Double, top as Double, width as Double, height as Double)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 7.8 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
On success the handle property is not zero.
See also:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 18.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Invoked automatically at the end of a series of changes, this method posts an NSTextDidChangeNotification to the default notification center, which also results in the delegate receiving an NSText delegate textDidChange message.
Subclasses implementing methods that change their text should invoke this method at the end of those methods. See Subclassing NSTextView for more information.
NSTextViewMBS.insertText(attributedString as NSAttributedStringMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
text: The string to insert. Can be either an string or an NSAttributedStringMBS object.
The inserted text is assigned the current typing attributes.
This method is the means by which text typed by the user enters an NSTextView. See the NSInputManager class and NSTextInput protocol specifications for more information.
This method is the entry point for inserting text typed by the user and is generally not suitable for other purposes. Programmatic modification of the text is best done by operating on the text storage directly. Because this method pertains to the actions of the user, the text view must be editable for the insertion to work.
See also:
NSTextViewMBS.insertText(text as string)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
text: The string to insert. Can be either an string or an NSAttributedStringMBS object.
The inserted text is assigned the current typing attributes.
This method is the means by which text typed by the user enters an NSTextView. See the NSInputManager class and NSTextInput protocol specifications for more information.
This method is the entry point for inserting text typed by the user and is generally not suitable for other purposes. Programmatic modification of the text is best done by operating on the text storage directly. Because this method pertains to the actions of the user, the text view must be editable for the insertion to work.
See also:
NSTextViewMBS.invalidateTextContainerOrigin
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method is invoked automatically; you should never need to invoke it directly. Usually called because the text view has been resized or the contents of the text container have changed.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Kerning values are determined by the point size of the fonts in the selection.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
As such, this method defines a more primitive operation than subscripting.
NSTextViewMBS.orderFrontLinkPanel
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available in Mac OS X v10.4 and later.
Some examples using this method:
NSTextViewMBS.orderFrontListPanel
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available in Mac OS X v10.4 and later.
Some examples using this method:
NSTextViewMBS.orderFrontSpacingPanel
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available in Mac OS X v10.4 and later.
Some examples using this method:
NSTextViewMBS.orderFrontSubstitutionsPanel
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Available on Mac OS X 10.6 or newer.
Some examples using this method:
NSTextViewMBS.orderFrontTablePanel
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 11.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Some examples using this method:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If there is a selection and the first character of the selected range has a non-zero stroke width, or if there is no selection and the typing attributes have a non-zero stroke width, then the stroke width is removed; otherwise the value of NSStrokeWidthAttributeName is set to the default value for outline (3.0).
Operates on the selected range if the receiver contains rich text. For plain text the range is the entire contents of the receiver.
NSTextViewMBS.pasteAsPlainText
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This method behaves analogously to insertText.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The text is inserted at the insertion point if there is one, otherwise replacing the selection.
NSTextViewMBS.performFindPanelAction(FindAction as Integer)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This is the generic action method for the find menu and find panel, and can be overridden to implement a custom find panel.
Possible values:
NSFindPanelActionShowFindPanel = 1
NSFindPanelActionNext = 2
NSFindPanelActionPrevious = 3
NSFindPanelActionReplaceAll = 4
NSFindPanelActionReplace = 5
NSFindPanelActionReplaceAndFind = 6
NSFindPanelActionSetFindString = 7
NSFindPanelActionReplaceAllInSelection = 8
NSFindPanelActionSelectAll = 9
NSFindPanelActionSelectAllInSelection = 10
See also:
Some examples using this method:
NSTextViewMBS.performFindPanelAction(sender as object)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
This is the generic action method for the find menu and find panel, and can be overridden to implement a custom find panel.
Sender could be a NSMenuItem or maybe also a NSView.
See also:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
As such, this method defines a more primitive operation than superscripting.
NSTextViewMBS.replaceTextContainer(textContainer as NSTextContainerMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
textContainer: The new text container. This method raises NSInvalidArgumentException if TextContainer is nil.
NSTextViewMBS.shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string = "") as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 18.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
affectedCharRange: The range of characters affected by the proposed change.
replacementString: The characters that will replace those in affectedCharRange. If only text attributes are being changed, replacementString is "".
Returns true to allow the change, false to prohibit it.
This method checks with the delegate as needed using textShouldBeginEditing and shouldChangeTextInRange.
This method must be invoked at the start of any sequence of user-initiated editing changes. If your subclass of NSTextView implements methods that modify the text, make sure to invoke this method to determine whether the change should be made. If the change is allowed, complete the change by invoking the didChangeText method.
If the receiver is not editable, this method automatically returns false. This result prevents instances in which a text view could be changed by user actions even though it had been set to be non-editable.
In macOS 10.4 and later, if there are multiple selections, this method acts on the first selected subrange.
See also:
NSTextViewMBS.showFindIndicatorForRange(charRange as NSRangeMBS)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
charRange: The character range around which indicators appear.
This method supports lozenge-style indication of find results. The indicators automatically disappear after a certain period of time, or when the method is called again, or when any of a number of changes occur to the view (such as changes to text, view size, or view position).
This method does not itself scroll the specified range to be visible; any desired scrolling should be done before this method is called, first, because the method acts only on the visible portion of the specified range, and, second, because scrolling causes the indicators to disappear. Calling this method with a zero-length range always removes any existing indicators.
Available in OS X v10.5 and later.
Some examples using this method:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSTextViewMBS.updateDragTypeRegistration
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
If the receiver is editable and is a rich text view, causes all text views associated with the receiver's layout manager to register their acceptable drag types. If the text view isn't editable or isn't rich text, causes those text views to unregister their dragged types.
Subclasses can override this method to change the conditions for registering and unregistering drag types, whether as a group or individually based on the current state of the text view. They should invoke this method when that state changes to perform the necessary update.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Does nothing if the receiver doesn't use the Font panel. You should never need to invoke this method directly, but you can override it if needed to handle additional font attributes.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 9.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
Does nothing if the ruler isn't visible or if the receiver doesn't use the ruler. You should never need to invoke this method directly, but you can override this method if needed to handle additional ruler attributes.
Some examples using this method:
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSTextViewMBS.useStandardKerning
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
NSTextViewMBS.useStandardLigatures
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | Cocoa Controls | MBS MacCocoa Plugin | 8.6 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The items on this page are in the following plugins: MBS MacCocoa Plugin.