Re: NSTextView and NSTextContainer size & clipping area
Re: NSTextView and NSTextContainer size & clipping area
- Subject: Re: NSTextView and NSTextContainer size & clipping area
- From: Дмитрий Николаев <email@hidden>
- Date: Sun, 08 May 2011 23:25:42 +0400
I will try this solution too. Thanks for suggesting.
08.05.2011, в 21:33, Kyle Sluder написал(а):
> On May 8, 2011, at 3:27 AM, Дмитрий Николаев <email@hidden> 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?
>
> --Kyle Sluder
_______________________________________________
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