Re: Questions on using a NSTextView as a source viewer.
Re: Questions on using a NSTextView as a source viewer.
- Subject: Re: Questions on using a NSTextView as a source viewer.
- From: Ken Thomases <email@hidden>
- Date: Sat, 11 Oct 2014 19:21:48 -0500
On Oct 11, 2014, at 9:23 AM, Keary Suska <email@hidden> wrote:
> On Oct 11, 2014, at 3:53 AM, Daryle Walker <email@hidden> wrote:
>
>> On Oct 10, 2014, at 1:58 AM, Ken Thomases <email@hidden> wrote:
>>
>>> I tested this and it worked for me. In summary, all three steps:
>>>
>>> * Set the text view's max. width
>>> * Set the text view to be horizontally resizable
>>> * Set textView.textContainer.widthTracksTextView = NO
>>
>> I had that before my last post; didn’t fix it, made it worse (text width is the initial width of the window, even if I Zoom it out, or manually make it wider, or narrower(!)).
>
> I think Ken mis-stated what he meant--the max width isn't terribly relevant. You need to set the actual container size (width minimally) to an unlikely large number. Apple's TextViewSizing example project demonstrates this. They use the value 1.0e7, which comments say is the largest possible value before experiencing text drawing issues. You will have to set this value in code, as it can't be set via IB.
No, I said what I meant. I tested the configuration I laid out and it worked. I'm not sure why it wasn't working for Daryle. Explicitly setting the text container size seems like a reasonable step, of course; it just wasn't necessary in my experiments.
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