• 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
NSText -sizeToFit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSText -sizeToFit


  • Subject: NSText -sizeToFit
  • From: Daniel Todd Currie <email@hidden>
  • Date: Sat, 22 May 2004 23:04:58 -0700

This isn't a question and I don't expect an answer, but I just thought I'd get this into the archives. I've been tearing my hair out for hours over this, hopefully I can save someone else the trouble...

This is quite obvious in hindsight, but the -sizeToFit method doesn't shrink NSTextViews, it will only grow them. If the NSTextView is already too large for the text content, it must still fill the enclosing scroll view, thus -sizeToFit cannot make it any smaller.

My solution to this problem is to set the enclosing NSScrollView's frame to something very small and then call -sizeToFit.

-- Daniel Currie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Spinning beach ball of death
  • Next by Date: NSDrawer Anomolies
  • Previous by thread: Re: Spinning beach ball of death
  • Next by thread: NSDrawer Anomolies
  • Index(es):
    • Date
    • Thread