Re: NSTextField sizing to fit
Re: NSTextField sizing to fit
On Tue, Dec 17, 2002 at 08:53:42AM -0800, Mike Ferris wrote:
>
How about using NSTextFieldCell's -cellSizeForBounds:? Give it a rect
>
with the width you want and a big height. Since this is
>
NSTextFieldCell, the size it returns will be appropriate. If you use
>
the text system directly as your sample code did, you'll get something
>
that fits the text but not necessarily any extra padding or borders or
>
whatever that NSTextFieldCell uses.
Works perfectly, thanks. I did check for methods that NSTextFieldCell
declared, but forgot to check for methods in its superclasses...
--
=Nicholas Riley <email@hidden> | <
http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
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.