Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo
Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo
- Subject: Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 24 Apr 2016 12:29:08 -0400
> On Apr 24, 2016, at 12:04 PM, Dave <email@hidden> wrote:
>
> I’m not sure what you mean? Is this a method or property on NSScrollView or NSTextView?
>
> I can’t see it in the XIB file?
In an NSTextField, IB shows you the "Layout" pop-up menu, which includes a "truncate" item, and the "Uses Single Line Mode" checkbox just below. From the docs, I think the single line mode might ignore the Layout settings. The same IB controls are of course available in the text field in the cell view in a view-based table view. The methods underlying these settings are in NSCell.
You can control trucation behavior in an NSTextView by using NSTextStorage, which is a subclass of NSMutableAttributedString. The truncation methods are in NSParagraphStyle).
--
Bill Cheeseman - email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden