Platforms to show: All Mac Windows Linux Cross-Platform
NSParagraphStyleMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Instances of these classes are often referred to as paragraph style objects or, when no confusion will result, paragraph styles.
The mutable subclass of NSParagraphStyle is NSMutableParagraphStyle.
- 19 properties
- property alignment as Integer
- property baseWritingDirection as Integer
- property defaultTabInterval as Double
- property firstLineHeadIndent as Double
- property firstTabStop as NSTextTabMBS
- property firstTextList as NSTextListMBS
- property Handle as Integer
- property headerLevel as Integer
- property headIndent as Double
- property hyphenationFactor as Double
- property lineBreakMode as Integer
- property lineHeightMultiple as Double
- property lineSpacing as Double
- property maximumLineHeight as Double
- property minimumLineHeight as Double
- property paragraphSpacing as Double
- property paragraphSpacingBefore as Double
- property tailIndent as Double
- property tighteningFactorForTruncation as Double
- 6 methods
- method Constructor
- method copy as NSParagraphStyleMBS
- method mutableCopy as NSMutableParagraphStyleMBS
- method tabStops as NSTextTabMBS()
- method textBlocks as NSTextBlockMBS()
- method textLists as NSTextListMBS()
- 4 shared methods
- shared method defaultParagraphStyle as NSParagraphStyleMBS
- shared method defaultWritingDirectionForLanguage(languageName as string) as Integer
- shared method NSCenterTextAlignment as Integer
- shared method NSRightTextAlignment as Integer
- 12 constants
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. |
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. |
Sub classes:
Some methods using this class:
- NSMutableParagraphStyleMBS.setParagraphStyle(ParagraphStyle as NSParagraphStyleMBS)
Some examples using this class:
- /MacCG/CoreText/CoreText Dynamic Text Height
- /MacCocoa/SelTextBackColor
- /MacCocoa/Text List
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Database with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV Simple Demo with DataSource
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListBoxTV TableView
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Flat Only/ListboxTV with ContainerControl Cells
- /MacControls/Listbox and TableView Demos/ListboxTV drop-in/Hierarchical & Flat/ListBoxTV OutlineView
- /MacControls/NSTextView Unlimited Tab
Blog Entries
- MBS Xojo Plugins, version 22.1pr3
- News from the MBS Xojo Plugins Version 22.0
- MonkeyBread Software Releases the MBS Xojo Plugins in version 18.1
- MBS Xojo Plugins, version 18.1pr3
- MBS Xojo / Real Studio Plugins, version 13.5pr9
- MBS Real Studio Plugins, version 12.5pr3
- MBS Real Studio Plugins, version 12.4pr1
Release notes
- Version 22.1
- Changed NSCenterTextAlignment and NSRightTextAlignment to from constants to shared methods to return correct values for PDFAnnotationTextWidgetMBS, NSParagraphStyleMBS, NSTextMBS and PDFAnnotationFreeTextMBS classes.
- Version 18.1
- Added firstTabStop and firstTextList properties to NSParagraphStyleMBS for debugging.
- Added NSTextListMBS class and related methods for NSMutableParagraphStyleMBS, NSParagraphStyleMBS and NSAttributedStringMBS class.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSPanelMBS - NSPasteboardItemDataProviderMBS