Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSTextViewMBS class.

Previous items

NSTextViewMBS.textContainerInset as NSSizeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The empty space the receiver leaves around its text container.
Example
dim n as NSTextViewMBS = TextArea1.NSTextViewMBS

n.textContainerInset = NSMakeSizeMBS(-3,0)

It is possible to set the text container and view sizes and resizing behavior so that the inset cannot be maintained exactly, although the text system tries to maintain the inset wherever possible. In any case, the textContainerOrigin and size of the text container are authoritative as to the location of the text container within the view.

The text itself can have an additional inset, inside the text container, specified by the setLineFragmentPadding method of NSTextContainer.
(Read and Write property)

Some examples using this property:

NSTextViewMBS.textContainerOrigin as NSPointMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 11.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the origin of the receiver's text container.

The origin of the receiver's text container, which is calculated from the receiver's bounds rectangle, container inset, and the container's used rect.
(Read only property)

NSTextViewMBS.textStorage as NSTextStorageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 12.2 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Returns the receiver's text storage object.
Example
// load rtfd file into textarea
dim file as FolderItem = SpecialFolder.Desktop.Child("test.rtfd")
dim n as NSAttributedStringMBS = NSAttributedStringMBS.attributedStringWithPath(file)
dim t as NSTextViewMBS = TextArea1.NSTextViewMBS
t.textStorage.setAttributedString(n)

(Read only property)

NSTextViewMBS.typingAttributes as dictionary

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Get or set typing attributes.

Typing attributes are reset automatically whenever the selection changes. However, if you add any user actions that change text attributes, the action should use this method to apply those attributes afterwards. User actions that change attributes should always set the typing attributes because there might not be a subsequent change in selection before the next typing.
(Read and Write property)

Some examples using this property:

NSTextViewMBS.usesFindBar as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 18.5 ✅ Yes ❌ No ❌ No ❌ No Desktop only
A Boolean value that indicates whether to use the find bar for this text view.

The value of this property is true if the find bar is used for this text view; otherwise false.
See NSTextFinderMBS class for information about the find bar.
A text view can use either a find panel or a find bar. If usesFindBar is set to true, usesFindPanel is set to false and vice versa.
(Read and Write property)

Some examples using this property:

NSTextViewMBS.usesFindPanel as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the receiver allows for a find panel.

(Read and Write property)

Some examples using this property:

NSTextViewMBS.usesFontPanel as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Controls whether the text views sharing the receiver's layout manager use the Font panel and Font menu.

(Read and Write property)

NSTextViewMBS.usesInspectorBar as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 14.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether this text view uses the inspector bar.
Example
dim t as NSTextViewMBS = textarea1.NSTextViewMBS
t.usesInspectorBar = true

Available in OS X v10.7 and later.
(Read and Write property)

NSTextViewMBS.usesRuler as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Cocoa Controls MBS MacCocoa Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether the text views sharing the receiver's layout manager use a ruler.

True to cause text views sharing the receiver's layout manager to respond to NSRulerView client messages and to paragraph-related menu actions, and update the ruler (when visible) as the selection changes with its paragraph and tab attributes, otherwise false.

Text views must use a ruler to respond to Format menu commands. If a set of text views don't use the ruler, the ruler is hidden, and the text views disallow paragraph attribute changes. By default, text view objects use the ruler.
(Read and Write property)

Previous items

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


💬 Ask a question or report a problem
The biggest plugin in space...