• 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: Making NSView auto resize to fit contents of NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making NSView auto resize to fit contents of NSTextView


  • Subject: Re: Making NSView auto resize to fit contents of NSTextView
  • From: Graham Cox <email@hidden>
  • Date: Sat, 24 Oct 2009 11:06:01 +1100


On 24/10/2009, at 10:43 AM, PCWiz wrote:

I basically need a way of getting the height of the text view needed to display all the text.

Welcome to the wonderful world of the Cocoa text system! You need to go deeper into the text system and look at the NSLayoutManager object:


- (NSRect)usedRectForTextContainer:(NSTextContainer *)aTextContainer

file:///Developer/Documentation/DocSets/com.apple.adc.documentation.AppleSnowLeopard.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Conceptual/TextLayout/TextLayout.html

This is listed as a common task in that document: "Calculating Text Height"

--Graham




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Making NSView auto resize to fit contents of NSTextView
      • From: PCWiz <email@hidden>
References: 
 >Making NSView auto resize to fit contents of NSTextView (From: PCWiz <email@hidden>)

  • Prev by Date: Re: 2 Questions about the project "With and Without bindings"
  • Next by Date: Re: 2 Questions about the project "With and Without bindings"
  • Previous by thread: Making NSView auto resize to fit contents of NSTextView
  • Next by thread: Re: Making NSView auto resize to fit contents of NSTextView
  • Index(es):
    • Date
    • Thread