Re: Making NSView auto resize to fit contents of NSTextView
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