NSText -sizeToFit
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.