Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

NSMutableParagraphStyleMBS class

Super class: NSParagraphStyleMBS

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class Cocoa MBS MacCocoa Plugin 12.4 Yes No No Yes, macOS only No
Function: NSMutableParagraphStyle adds methods to its superclass, NSParagraphStyle, for changing the values of the subattributes in a paragraph style attribute.
Example:
dim n as NSParagraphStyleMBS = NSParagraphStyleMBS.defaultParagraphStyle
MsgBox str(n.alignment) // 4 = natural

dim m as NSMutableParagraphStyleMBS = n.mutableCopy
m.setAlignment NSParagraphStyleMBS.NSCenterTextAlignment
MsgBox str(m.alignment) // 2 = center
Notes:
See the NSParagraphStyle and NSAttributedString specifications for more information.

Important A paragraph style object should not be mutated after adding it to an attributed string; doing so can cause your program to crash.
Subclass of the NSParagraphStyleMBS class.

Feedback, Comments & Corrections

Super class NSParagraphStyleMBS

Alignment Modes

Constant Value Description
NSCenterTextAlignment 2 Visually centered
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.
NSRightTextAlignment 1 Visually right aligned

Line Break Modes

Constant Value Description
NSLineBreakByCharWrapping 1 Wrapping occurs before the first character that doesn't fit.
NSLineBreakByClipping 2 Lines are simply not drawn past the edge of the text container.
NSLineBreakByTruncatingHead 3 Each line is displayed so that the end fits in the container and the missing text is indicated by some kind of ellipsis glyph.
NSLineBreakByTruncatingMiddle 5 Each line is displayed so that the beginning and end fit in the container and the missing text is indicated by some kind of ellipsis glyph in the middle.
NSLineBreakByTruncatingTail 4 Each line is displayed so that the beginning fits in the container and the missing text is indicated by some kind of ellipsis glyph.
NSLineBreakByWordWrapping 0 Wrapping occurs at word boundaries, unless the word itself doesn't fit on a single line.

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.

This class has no sub classes.

Some methods using this class:

Some examples which use this class:


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


NSMutableIndexSetMBS   -   NSMutableURLRequestMBS




Links
MBS FileMaker tutorial videos