Re: Acquiring the visible characters from a NSTextView
Re: Acquiring the visible characters from a NSTextView
- Subject: Re: Acquiring the visible characters from a NSTextView
- From: SA Dev <email@hidden>
- Date: Wed, 22 Jun 2005 15:25:22 -0400
The one method that comes to mind is NSLayoutManager's -
glyphRangeForBoundingRect:inTextContainer: method. You'll need to
understand how a text view is constructed (it's in the docs) to
figure out how to find the bounding rect based on what the textg
view's enclosing scroll view is showing. You'll get back a range of
glyphs.
There may be an easier/better way, but this was the first thing
that popped into mind. Anybody?
On Jun 22, 2005, at 3:09 PM, Ian Archer wrote:
I want to get a copy of the characters that are visible (from
scrolling) within a NSTextView. Going through
NSTextStorage->[NSMutableAttributedString mutableString] returns
everything.
Anyone know of a way to do this?
<ia>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to email@hidden
_______________________________________________
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