Skip navigation.
 
mlRe: NSTextField sizing to fit
FROM : Nicholas Riley
DATE : Tue Dec 17 18:45:42 2002

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_removed>> | <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_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlNSTextField sizing to fit Nicholas Riley Dec 17, 16:42
mlRe: NSTextField sizing to fit Mike Ferris Dec 17, 17:53
mlRe: NSTextField sizing to fit Nicholas Riley Dec 17, 18:45
mlRe: NSTextField sizing to fit matt neuburg Dec 17, 21:19