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 PROTECTED]




_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to