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: Dave <email@hidden>
- Date: Mon, 25 Apr 2016 11:48:53 +0100
I’ve found the Text Storage like this:
NSTextStorage* myTextStorage;
myTextStorage = [[self.pLogScrollView documentView] textStorage];
> You can control trucation behavior in an NSTextView by using NSTextStorage, which is a subclass of NSMutableAttributedString. The truncation methods are in NSParagraphStyle).
But when I look in NSTextStore Class Reference I can see nothing relating to setting paragraph styles?
There’s a “paragraph” property but it says:
Special Considerations
Unless you are dealing with scriptability, you should not invoke this method directly.
I can’t believe its this hard to set wrapping or not and I can’t find real info on this from searching either.
Does anyone have some code that does this or something similar?
All the Best
Dave
> On 24 Apr 2016, at 18:36, Bill Cheeseman <email@hidden> wrote:
>
>
>> On Apr 24, 2016, at 1:13 PM, Dave <email@hidden> wrote:
>>
>> I’ve got the Text View Selected in XCode/IB and I can’t find any option for “Layout” in any of the property tabs? Auto-layout is off at the moment for this window, it wouldn’t have anything to do with that would it?
>
> I was describing text fields in my first paragraph, about nib files and storyboards. My second paragraph was about text views, which you have to do programmatically as far as I know.
>
> --
>
> 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