• 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
Space Required By Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Space Required By Text


  • Subject: Space Required By Text
  • From: David Remahl <email@hidden>
  • Date: Wed, 30 May 2001 18:51:08 +0200

Hi.

I have a text, which I would like to display in a text field. I would like to size the text field on run time to fit exactly the text. The text is line-broken by hard breaks, and occupies many lines, and approximately 80 columns. I would like to know the rect in which the text exactly fits using my font attributes.

I think this could be made using a constellation of NSTextContainer, NSLayoutManager, NSTextStorage and possible other classes, but I don't see how they fit.

/ thanks, David


  • Follow-Ups:
    • Re: Space Required By Text
      • From: Vince DeMarco <email@hidden>
    • Re: Space Required By Text
      • From: Andrew Platzer <email@hidden>
    • Re: Space Required By Text
      • From: Douglas Davidson <email@hidden>
    • Re: Space Required By Text
      • From: John Hörnkvist <email@hidden>
    • Re: Space Required By Text
      • From: <email@hidden>
  • Prev by Date: Re: Simple Port Traffic?
  • Next by Date: Re: Foundation tool question
  • Previous by thread: Cocoa for "platform independence"???
  • Next by thread: Re: Space Required By Text
  • Index(es):
    • Date
    • Thread