• 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: location of text in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >location of text in NSTextView (From: Nik Youdale <email@hidden>)

  • Prev by Date: Re: location of text in NSTextView
  • Next by Date: Setting sub entities in code does not propagate attributes and relationships?
  • Previous by thread: Re: location of text in NSTextView
  • Next by thread: Setting sub entities in code does not propagate attributes and relationships?
  • Index(es):
    • Date
    • Thread