• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField sizing to fit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField sizing to fit


  • Subject: Re: NSTextField sizing to fit
  • From: Nicholas Riley <email@hidden>
  • Date: Tue, 17 Dec 2002 11:45:42 -0600
  • Mail-followup-to: Mike Ferris <email@hidden>, email@hidden

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.

References: 
 >NSTextField sizing to fit (From: Nicholas Riley <email@hidden>)
 >Re: NSTextField sizing to fit (From: Mike Ferris <email@hidden>)

  • Prev by Date: Re: NSTableView - Alternating blue and white background
  • Next by Date: Text with background image in table cell
  • Previous by thread: Re: NSTextField sizing to fit
  • Next by thread: Re: NSTextField sizing to fit
  • Index(es):
    • Date
    • Thread