Re: location of text in NSTextView
Re: location of text in NSTextView
- Subject: Re: location of text in NSTextView
- From: Satoshi Matsumoto <email@hidden>
- Date: Sun, 22 Jan 2006 12:06:27 +0900
- Thread-topic: location of text in NSTextView
on 06.01.22 11:40 AM, Nik Youdale at email@hidden wrote:
> Is there any way to get the location (either an NSRect or an NSPoint)
> of text within a specified range in an NSTextView?
You can get the location of a character range using following NSLayoutManger
methods.
- (NSRange)glyphRangeForCharacterRange:(NSRange)charRange
actualCharacterRange:(NSRange *)actualCharRange
- (NSRect)boundingRectForGlyphRange:(NSRange)glyphRange
inTextContainer:(NSTextContainer *)container;
Satoshi
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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