Re: Get text height to print a custom view with NSTextView subview
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