Platforms to show: All Mac Windows Linux Cross-Platform

NSTextMBS class

Super class: NSViewMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Cocoa Text MBS MacCocoa Plugin 7.8 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The Cocoa class for text controls.

You may prefer to use the NSTextViewMBS class which is a subclass from NSTextMBS.

You can embed this view in a CustomNSViewMBS to get more events for mouse and keyboard.
Subclass of the NSViewMBS class.

Constants

Constant Value Description
NSBackspaceCharacter 8 One of the constants to specify commonly used Unicode characters.
NSBackTabCharacter &h19 One of the constants to specify commonly used Unicode characters.
NSBacktabTextMovement &h12 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The Backtab (Shift-Tab) key was pressed.
NSCancelTextMovement &h17 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The user cancelled the completion.
Available in Mac OS X v10.3 and later.
NSCarriageReturnCharacter 13 One of the constants to specify commonly used Unicode characters.
NSDeleteCharacter &h7F One of the constants to specify commonly used Unicode characters.
NSDownTextMovement &h16 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The down arrow key was pressed.
NSEnterCharacter 3 One of the constants to specify commonly used Unicode characters.
NSFormFeedCharacter 12 One of the constants to specify commonly used Unicode characters.
NSIllegalTextMovement 0 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" Currently unused.
NSLeftTextMovement &h13 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The left arrow key was pressed.
NSLineSeparatorCharacter &h2028 One of the constants to specify commonly used Unicode characters.
NSNewlineCharacter 10 One of the constants to specify commonly used Unicode characters.
NSOtherTextMovement 0 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The user performed some undefined action.

Available in Mac OS X v10.3 and later.
NSParagraphSeparatorCharacter &h2029 One of the constants to specify commonly used Unicode characters.
NSReturnTextMovement &h10 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The Return key was pressed.
NSRightTextMovement &h14 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The right arrow key was pressed.
NSTabCharacter 9 One of the constants to specify commonly used Unicode characters.
NSTabTextMovement &h11 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The Tab key was pressed.
NSTextWritingDirectionEmbedding 0 An additional constant to specify the writing direction. Direction is embedded.
Available in Mac OS X v10.6 and later.
NSTextWritingDirectionOverride 1 An additional constant to specify the writing direction. Direction override
Available in Mac OS X v10.6 and later.
NSUpTextMovement &h15 One of the constants used to specify the reason for a change of editing focus among text fields, in essence answering the question "why am I leaving the field?" The up arrow key was pressed.

Alignment Modes

Constant Value Description
NSJustifiedTextAlignment 3 Fully-justified. The last line in a paragraph is natural-aligned.
NSLeftTextAlignment 0 Visually left aligned
NSNaturalTextAlignment 4 Indicates the default alignment for script.

Writing Direction

Constant Value Description
NSWritingDirectionLeftToRight 0 The writing direction is left to right.

Available in Mac OS X v10.2 and later.
NSWritingDirectionNatural -1 The writing direction is determined using the Unicode Bidi Algorithm rules P2 and P3. Default.

Available in Mac OS X v10.4 and later.
NSWritingDirectionRightToLeft 1 The writing direction is right to left.

Available in Mac OS X v10.2 and later.
Example

Super class NSViewMBS

Constants

Constant Value Description
NSBezelBorder 2 One of the constants to specify the type of a view's border. A concave border that makes the view look sunken.
NSFocusRingTypeDefault 0 One of the constants for the focusringtype property. The default focus ring type for NSView or NSCell.
NSFocusRingTypeExterior 2 One of the constants for the focusringtype property. The standard Aqua focus ring.
NSFocusRingTypeNone 1 One of the constants for the focusringtype property. No focus ring. If you set the focus ring type to this value, NSView and NSCell will not draw any focus ring.
NSGrooveBorder 3 One of the constants to specify the type of a view's border. A thin border that looks etched around the image.
NSLineBorder 1 One of the constants to specify the type of a view's border. A black line border around the view.
NSNoBorder 0 One of the constants to specify the type of a view's border. No border.
NSViewHeightSizable 16 One of the constants for the autoresizingMask property. The receiver's height is flexible.
NSViewLayerContentsRedrawBeforeViewResize 3 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawDuringViewResize 2 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawNever 0 One of the view layer content redraw policy constants.
NSViewLayerContentsRedrawOnSetNeedsDisplay 1 One of the view layer content redraw policy constants.
NSViewMaxXMargin 4 One of the constants for the autoresizingMask property. The right margin between the receiver and its superview is flexible.
NSViewMaxYMargin 32 One of the constants for the autoresizingMask property. The top margin between the receiver and its superview is flexible.
NSViewMinXMargin 1 One of the constants for the autoresizingMask property. The left margin between the receiver and its superview is flexible.
NSViewMinYMargin 8 One of the constants for the autoresizingMask property. The bottom margin between the receiver and its superview is flexible.
NSViewNotSizable 0 One of the constants for the autoresizingMask property. The receiver cannot be resized.
NSViewWidthSizable 2 One of the constants for the autoresizingMask property. The receiver's width is flexible.

Window Order Constants

Constant Value Description
NSWindowAbove 1 Moves the window above the indicated window.
NSWindowBelow -1 Moves the window below the indicated window.
NSWindowOut 0 Moves the window off the screen.

Super class NSResponderMBS

Sub classes:

Some methods using this class:

Some properties using for this class:

Some events using this class:

Some examples using this class:

Blog Entries

Release notes


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


NSTextListMBS   -   NSTextStorageMBS


The biggest plugin in space...