• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView and NSTextContainer size & clipping area
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView and NSTextContainer size & clipping area


  • Subject: Re: NSTextView and NSTextContainer size & clipping area
  • From: "Rimas M." <email@hidden>
  • Date: Mon, 09 May 2011 11:13:33 +0300

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 <email@hidden>

> 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?
>
_______________________________________________

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

References: 
 >NSTextView and NSTextContainer size & clipping area (From: Дмитрий Николаев <email@hidden>)
 >Re: NSTextView and NSTextContainer size & clipping area (From: Ross Carter <email@hidden>)
 >Re: NSTextView and NSTextContainer size & clipping area (From: Дмитрий Николаев <email@hidden>)
 >Re: NSTextView and NSTextContainer size & clipping area (From: Ross Carter <email@hidden>)
 >Re: NSTextView and NSTextContainer size & clipping area (From: Дмитрий Николаев <email@hidden>)
 >Re: NSTextView and NSTextContainer size & clipping area (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: what should I understand from kAudioQueueProperty_CurrentLevelMeterDB
  • Next by Date: transitionWithView:duration:options:animations:completion: still defeats me
  • Previous by thread: Re: NSTextView and NSTextContainer size & clipping area
  • Next by thread: Cocoa Typography: wrong presentation of space unicode characters
  • Index(es):
    • Date
    • Thread