• 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: Get text height to print a custom view with NSTextView subview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get text height to print a custom view with NSTextView subview


  • Subject: Re: Get text height to print a custom view with NSTextView subview
  • From: Douglas Davidson <email@hidden>
  • Date: Thu, 6 Jan 2005 09:43:54 -0800


On Jan 5, 2005, at 11:29 PM, David Sinclair wrote:


Put another way: given a NSTextView with arbitrary content (styled text, images, etc) and a known width, how can I immediately find out the appropriate height?

You can force a text view to be laid out immediately by asking its layout manager for the range of glyphs in its text container, using glyphRangeForTextContainer:. The CircleView example uses the method for essentially this purpose (but without a text view), and has a comment to this effect.


Douglas Davidson

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Get text height to print a custom view with NSTextView subview (From: David Sinclair <email@hidden>)

  • Prev by Date: NSTableView custom cell problem
  • Next by Date: Re: Undo logic location?
  • Previous by thread: Get text height to print a custom view with NSTextView subview
  • Next by thread: Newbie: debugging raised exception
  • Index(es):
    • Date
    • Thread