Re: NSTextView Question
Re: NSTextView Question
- Subject: Re: NSTextView Question
- From: Dave <email@hidden>
- Date: Tue, 08 Sep 2015 16:30:55 +0100
Brilliant! Just what I wanted - did the trick wonderfully, thanks again, I would never have thought to look in the Size Panel. BTW, the code is needed, e.g.
self.pDetailTextView.textContainer.containerSize = NSMakeSize(FLT_MAX, FLT_MAX);
self.pDetailTextView.textContainer.widthTracksTextView = NO;
All the Best
Dave
> On 8 Sep 2015, at 16:17, Ken Thomases <email@hidden> wrote:
>
> On Sep 8, 2015, at 9:22 AM, Dave <email@hidden> wrote:
>
>> I’ve got an NSTextView that’s working in that it Scrolls ok vertically, but If I have a long line, it wraps instead of clipping the line and allowing Horizontal Scrolling. I’ve looked at the properties of the ScrollView and the underlying TextView but I can see no option to have it truncate lines, whereas AFAIR, this option is present in a NSTextField. I’ve got Show H Scroller, Show V Scroller and Automatically Hide Scroller all set to ON.
>
> On the Size inspector for the text view, check Resizable: Horizontally. Also, set the maximum width to a very big number.
>
> I expect that this also sets the text view's text container to not track its view's width. If it doesn't, then you may have to do that in code:
>
> theTextView.textContainer.containerSize = NSMakeSize(FLT_MAX, FLT_MAX);
> theTextView.textContainer.widthTracksTextView = NO;
>
> Regards,
> Ken
>
_______________________________________________
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