As far as I remember, text container inset sets "margins" from both sides:
left and right and/or top and bottom. If text container position is
important according to the text view, this will not work.

2011/5/8 Kyle Sluder <kyle.slu...@gmail.com>

> On May 8, 2011, at 3:27 AM, Дмитрий Николаев <blacklit...@gmail.com>
> wrote:
>
> > Custom textview resize policy set, so it resizes in all dimensions with
> container. This is code for custom NSTextView
> >
> > ---------
> > - (void) setFrameSize:(NSSize)newSize {
> >
> >   [super setFrameSize:newSize];
> >
> >   NSTextContainer *container = [self textContainer];
> >   newSize.width -= 200;
> >   [container setContainerSize:newSize];
> > }
>
> Unrelated, by why aren't you just using -[NSTextView
> setTextContainerInset:] and letting the default width-tracking code do the
> work for you?
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to