Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTextMBS class.

NSTextMBS.scrollRangeToVisible(start as Integer, length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Scrolls the receiver in its enclosing scroll view so the first characters of aRange are visible.

NSTextMBS.selectAll

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method selects all of the receiver's text.

NSTextMBS.selectedRange as NSRangeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 9.6 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The range of selected characters.
Example
Var t as NSTextViewMBS = TextArea1.NSTextViewMBS
Var s as NSTextStorageMBS = t.textStorage

const NSUnderlineStyleSingle = 1

Var r as NSRangeMBS = t.selectedRange
s.addAttribute NSAttributedStringMBS.NSStrikethroughStyleAttributeName, NSUnderlineStyleSingle, r

(Read and Write computed property)

Some examples using this property:

NSTextMBS.setFontForRange(font as NSFontMBS, start as Integer, length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the font of characters within the given range to font.

This method applies only to a rich text object.

This method does not include undo support by default. Clients must invoke shouldChangeTextInRanges to include this method in an undoable action.

NSTextMBS.setMaxSize(width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the receiver's maximum size.

NSTextMBS.setMinSize(width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the receiver's minimum size.

NSTextMBS.setTextColorForRange(colorValue as NSColorMBS, start as Integer, length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Sets the text color of characters within the given range to colorValue.

Removes the text color attribute if colorValue is nil. This method applies only to rich text objects.

This method does not include undo support by default. Clients must invoke shouldChangeTextInRange to include this method in an undoable action.

NSTextMBS.showGuessPanel

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method opens the Spelling panel, allowing the user to make a correction during spell checking.

NSTextMBS.sizeToFit

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Resizes the receiver to fit its text.

The text view will not be sized any smaller than its minimum size, however.

NSTextMBS.subscript

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method applies a subscript attribute to selected text (or all text if the receiver is a plain text object), lowering its baseline offset by a predefined amount.

NSTextMBS.superscript

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
This action method applies a superscript attribute to selected text (or all text if the receiver is a plain text object), raising its baseline offset by a predefined amount.

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


The biggest plugin in space...