Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSMutableParagraphStyleMBS class.
NSMutableParagraphStyleMBS.addTabStop(tabstop as NSTextTabMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSMutableParagraphStyleMBS.Constructor
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSMutableParagraphStyleMBS.removeTabStop(tabstop as NSTextTabMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSMutableParagraphStyleMBS.setAlignment(alignment as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
alignment may be one of:
NSLeftTextAlignment
NSRightTextAlignment
NSCenterTextAlignment
NSJustifiedTextAlignment
NSNaturalTextAlignment
NSMutableParagraphStyleMBS.setBaseWritingDirection(writingDirection as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
It can be NSWritingDirectionNaturalDirection, NSWritingDirectionLeftToRight, or NSWritingDirectionRightToLeft. If you specify NSWritingDirectionNaturalDirection, the receiver resolves the writing direction to either NSWritingDirectionLeftToRight or NSWritingDirectionRightToLeft, depending on the direction for the user's language preference setting.
NSMutableParagraphStyleMBS.setDefaultTabInterval(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Tabs after the last specified in tabStops are placed at integral multiples of this distance. This value must be nonnegative.
Some examples using this method:
NSMutableParagraphStyleMBS.setFirstLineHeadIndent(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This value must be nonnegative.
NSMutableParagraphStyleMBS.setHeaderLevel(level as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Should be set to 0 (the default value) if the paragraph is not a header, or from 1 through 6 if the paragraph is to be treated as a header.
NSMutableParagraphStyleMBS.setHeadIndent(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This value must be nonnegative.
NSMutableParagraphStyleMBS.setHyphenationFactor(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Valid values lie between 0.0 and 1.0 inclusive. The default value is 0.0. Hyphenation is attempted when the ratio of the text width (as broken without hyphenation) to the width of the line fragment is less than the hyphenation factor. When the paragraph's hyphenation factor is 0.0, the layout manager's hyphenation factor is used instead. When both are 0.0, hyphenation is disabled.
NSMutableParagraphStyleMBS.setLineBreakMode(mode as Integer)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The mode parameter may be one of:
NSLineBreakByWordWrapping
NSLineBreakByCharWrapping
NSLineBreakByClipping
NSLineBreakByTruncatingHead
NSLineBreakByTruncatingTail
NSLineBreakByTruncatingMiddle
See the description of lineBreakMode in the NSParagraphStyle class specification for descriptions of these values.
NSMutableParagraphStyleMBS.setLineHeightMultiple(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
The natural line height of the receiver is multiplied by this factor before being constrained by minimum and maximum line height. This value must be nonnegative.
Some examples using this method:
NSMutableParagraphStyleMBS.setLineSpacing(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This value must be nonnegative.
NSMutableParagraphStyleMBS.setMaximumLineHeight(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Glyphs and graphics exceeding this height will overlap neighboring lines; however, a maximum height of 0 implies no line height limit. This value must be nonnegative.
Although this limit applies to the line itself, line spacing adds extra space between adjacent lines.
NSMutableParagraphStyleMBS.setMinimumLineHeight(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This value must be nonnegative.
NSMutableParagraphStyleMBS.setParagraphSpacing(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This value must be nonnegative.
NSMutableParagraphStyleMBS.setParagraphSpacingBefore(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
This value must be nonnegative.
NSMutableParagraphStyleMBS.setParagraphStyle(ParagraphStyle as NSParagraphStyleMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
NSMutableParagraphStyleMBS.setTabStops(tabStops() as NSTextTabMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
Some examples using this method:
NSMutableParagraphStyleMBS.setTailIndent(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
If positive, this is the distance from the leading margin (for example, the left margin in left-to-right text). That is, it's the absolute line width. If 0 or negative, it's the distance from the trailing margin—the value is added to the line width.
For example, to create a paragraph style that fits exactly in a 2-inch wide container, set its head indent to 0.0 and its tail indent to 0.0. To create a paragraph style with quarter-inch margins, set its head indent to 0.25 and its tail indent to –0.25.
NSMutableParagraphStyleMBS.setTextBlocks(TextBlocks() as NSTextBlockMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 22.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSMutableParagraphStyleMBS.setTextLists(TextLists() as NSTextListMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 18.1 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Some examples using this method:
NSMutableParagraphStyleMBS.setTighteningFactorForTruncation(value as Double)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Text | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | All |
When the line break mode specifies truncation, the text system attempts to tighten intercharacter spacing as an alternative to truncation, provided that the ratio of the text width to the line fragment width does not exceed 1.0 + the value returned by tighteningFactorForTruncation. Otherwise the text is truncated at a location determined by the line break mode. The default value is 0.05. This method accepts positive and negative values. Values less than or equal to 0.0 result in not tightening.
The items on this page are in the following plugins: MBS MacCocoa Plugin.