Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTextMBS class.

NSTextMBS.alignment as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The text alignment.

(Read and Write computed property)

NSTextMBS.backgroundColor as NSColorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The background color.

(Read and Write computed property)

NSTextMBS.baseWritingDirection as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The initial writing direction used to determine the actual writing direction for text.

The Text system uses this value as a hint for calculating the actual direction for displaying Unicode characters. You should not need to call this method directly. If no writing direction is set, returns NSWritingDirectionNatural.

Available in Mac OS X v10.4 and later.
(Read and Write computed property)

NSTextMBS.changeFont

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 changes the font of the selection for a rich text object, or of all text for a plain text object.

If the receiver doesn't use the Font panel, this method does nothing.

This method changes the font by sending a convertFont message to the shared NSFontManager and applying each NSFont returned to the appropriate text. See the NSFontManager class specification for more information on font conversion.

NSTextMBS.checkSpelling

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 searches for a misspelled word in the receiver's text.

The search starts at the end of the selection and continues until it reaches a word suspected of being misspelled or the end of the text. If a word isn't recognized by the spelling server, a showGuessPanel message then opens the Guess panel and allows the user to make a correction or add the word to the local dictionary.

NSTextMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new text with size 100/100 and position 0/0
Example
Var t as new NSTextMBS

On success the handle property is not zero.

See also:

NSTextMBS.Constructor(Handle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 10.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates an object based on the given NSText handle.
Example
Var t as new NSTextMBS(0, 0, 100, 100)
Var v as new NSTextMBS(t.handle)

MsgBox str(v.Bounds.Width)+" x "+str(v.Bounds.Height)

The handle is casted to a NSText and the plugin retains this handle.

See also:

NSTextMBS.Constructor(left as Double, top as Double, width as Double, height as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates a new text with the given size and position.
Example
Var x as new NSTextMBS(0, 0, 100, 100)

On success the handle property is not zero.

See also:

NSTextMBS.copy

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 copies the selected text onto the general pasteboard, in as many formats as the receiver supports.

NSTextMBS.copyFont

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 copies the font information for the first character of the selection (or for the insertion point) onto the font pasteboard, as NSFontPboardType.

NSTextMBS.copyRuler

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 copies the paragraph style information for first selected paragraph onto the ruler pasteboard, as NSRulerPboardType, and expands the selection to paragraph boundaries.

NSTextMBS.cut

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 deletes the selected text and places it onto the general pasteboard, in as many formats as the receiver supports.

NSTextMBS.delete

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 deletes the selected text.

NSTextMBS.drawsBackground as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the scrollview draws its background.

(Read and Write computed property)

NSTextMBS.Enabled as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 16.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Enables/disables the control.

If enabled, text is in default text color.
if disabled, you can't edit or select and the text color is gray.
(Read and Write computed property)

NSTextMBS.font as NSFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The font of the first character in the receiver's text, or of the insertion point if there's no text.

(Read and Write computed property)

NSTextMBS.importsGraphics as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the receiver allows the user to import files by dragging.

(Read and Write computed property)

NSTextMBS.isEditable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the receiver allows the user to edit text, false if it doesn't.

You can change the receiver's text programmatically regardless of this setting.

If the receiver is editable, it's also selectable.
(Read and Write computed property)

NSTextMBS.isFieldEditor as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the receiver interprets Tab, Shift-Tab, and Return (Enter) as cues to end editing and possibly to change the first responder.

True if the receiver interprets Tab, Shift-Tab, and Return (Enter) as cues to end editing and possibly to change the first responder; false if it accepts them as text input.

See the NSWindow class specification for more information on field editors. By default, NSText objects don't behave as field editors.
(Read and Write computed property)

NSTextMBS.isHorizontallyResizable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the receiver automatically changes its width to accommodate the width of its text, false if it doesn't.

By default, an NSText object is not horizontally resizable.
(Read and Write computed property)

NSTextMBS.isRichText as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the NSText allows the user to apply attributes to specific ranges of the text.

(Read and Write computed property)

NSTextMBS.isRulerVisible as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the receiver's enclosing scroll view shows its ruler.

NSTextMBS.isSelectable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the text allows the user to select text, false if it doesn't.

(Read and Write computed property)

NSTextMBS.isVerticallyResizable as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
True if the receiver automatically changes its height to accommodate the height of its text, false if it doesn't.

By default, an NSText object is vertically resizable.
(Read and Write computed property)

NSTextMBS.maxSizeHeight 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
Returns the receiver's maximum height.

NSTextMBS.maxSizeWidth 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
Returns the receiver's maximum width.

NSTextMBS.minSizeHeight 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
Returns the receiver's minimum height.

NSTextMBS.minSizeWidth 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
Returns the receiver's maximum width.

NSTextMBS.paste

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 pastes text from the general pasteboard at the insertion point or over the selection.

NSTextMBS.pasteFont

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 pastes font information from the font pasteboard onto the selected text or insertion point of a rich text object, or over all text of a plain text object.

NSTextMBS.pasteRuler

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 pastes paragraph style information from the ruler pasteboard onto the selected paragraphs of a rich text object.

NSTextMBS.readRTFDFromFile(file as folderitem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Attempts to read the RTFD file, returning true if successful and false if not.

file should be the path for an .rtf file or an .rtfd file wrapper, not for the RTF file within an .rtfd file wrapper.

NSTextMBS.replaceCharactersInRangeWithRTF(start as Integer, length as Integer, rtfData as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Replaces the characters in the given range with RTF text interpreted from the given RTF data.

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.

This method is designed for transferring text from out-of-process sources such as the pasteboard. In most cases, programmatic modification of the text is best done by operating on the text storage directly, using the general methods of NSMutableAttributedString.

NSTextMBS.replaceCharactersInRangeWithRTFD(start as Integer, length as Integer, rtfdData as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Replaces the characters in the given range with RTFD text interpreted from the given RTFD data.

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.

This method is designed for transferring text from out-of-process sources such as the pasteboard. In most cases, programmatic modification of the text is best done by operating on the text storage directly, using the general methods of NSMutableAttributedString.

NSTextMBS.replaceCharactersInRangeWithString(start as Integer, length as Integer, text as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Replaces the characters in the given range with those in the given string.

For a rich text object, the text is assigned the formatting attributes of the first character of the text it replaces, or of the character immediately before aRange if the range's length is 0. If the range's location is 0, the formatting attributes of the first character in the receiver are used.

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

In most cases, programmatic modification of the text is best done by operating on the text storage directly, using the general methods of NSMutableAttributedString.

NSTextMBS.RTFDFromRange(start as Integer, length as Integer) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns a string that contains an RTFD stream corresponding to the characters and attributes within aRange.

Raises an NSRangeException if any part of aRange lies beyond the end of the receiver's characters.

When writing data to the pasteboard, you can use the memoryblock object as the first argument to NSPasteboard's setDataForType method, with a second argument of NSRTFDPboardType.

NSTextMBS.RTFFromRange(start as Integer, length as Integer) as MemoryBlock

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
eturns a string object that contains an RTF stream corresponding to the characters and attributes within aRange, omitting any attachment characters and attributes.

Raises an NSRangeException if any part of aRange lies beyond the end of the receiver's characters.

When writing data to the pasteboard, you can use the memoryblock as the first argument to NSPasteboard's setDataForType method, with a second argument of NSRTFPboardType.

NSTextMBS.text as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The characters of the text.

For performance reasons, this method returns the current backing store of the text object. If you want to maintain a snapshot of this as you manipulate the text storage, you should make a copy of the appropriate substring.
(Read and Write computed property)

NSTextMBS.textColor as NSColorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The text color.

(Read and Write computed property)

NSTextMBS.textLength as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 12.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the length of the text in unicode chars.

NSTextMBS.toggleRuler

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 shows or hides the ruler, if the receiver is enclosed in a scroll view.

NSTextMBS.underline

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds the underline attribute to the selected text attributes if absent; removes the attribute if present.

If there is a selection and the first character of the selected range has any form of underline on it, or if there is no selection and the typing attributes have any form of underline, then underline is removed; otherwise a single simple underline is added.

Operates on the selected range if the receiver contains rich text. For plain text the range is the entire contents of the receiver.

NSTextMBS.unscript

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 removes any superscripting or subscripting from selected text (or all text if the receiver is a plain text object).

NSTextMBS.usesFontPanel as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether the receiver uses the Font panel.

(Read and Write computed property)

NSTextMBS.writeRTFDToFile(file as folderitem, atomically as boolean) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Text MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Writes the receiver's text as RTF with attachments to a file or directory at file.

Returns true on success and false on failure. If atomically is true, attempts to write the file safely so that an existing file at path is not overwritten, nor does a new file at path actually get created, unless the write is successful.

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


The biggest plugin in space...