Re: Making a window fit its contents?
Re: Making a window fit its contents?
- Subject: Re: Making a window fit its contents?
- From: Nick Toumpelis <email@hidden>
- Date: Mon, 31 Mar 2008 11:33:34 +0300
Hi Jack,
the most effective way to do this is by using Jerry Krinock's
NS(Attributed)String+Geometrics categories [1]. Using this, you can
determine the height or width of your text and size your window (and
NSTextField) appropriately.
Nick
[1] http://sheepsystems.com/sourceCode
On 31 Μαρ 2008, at 9:06 ΠΜ, Jack Repenning wrote:
How can I [someNSTextField setStringValue:someString] (to some value
I only learn at run time), and then resize the window that contains
it so the string is visible? Or, is there something I can set in
Interface Builder that will make this resize happen automatically?
I found a sizeToFit in the NSTextField, but not on the surrounding
NSWindow or NSView.
Nick Toumpelis :: email:email@hidden
_______________________________________________
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