On Thu, Feb 26, 2009 at 10:49 AM, Eric Gorr <mail...@ericgorr.net> wrote: > Unfortunately, sizeToFit does not work. > > It doesn't appear one can constrain the width of a NSTextField and only have > it's height adjustable. Basically, sizeToFit provides a size that causes the > text in the field to fit on a single line.
Try sending -cellSizeForBounds: to your NSTextFieldCell. Give it a bounds with the correct width but a very tall height, and it should keep that width (or reduce it) and give you the appropriate height with wrapping. Mike _______________________________________________ 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