• 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: Is it possible to get mouse click position in Scroll View?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to get mouse click position in Scroll View?


  • Subject: Re: Is it possible to get mouse click position in Scroll View?
  • From: Shane Stanley <email@hidden>
  • Date: Sat, 02 Apr 2016 00:23:05 +1100

On 1 Apr 2016, at 10:17 PM, Shane Stanley <email@hidden> wrote:
>
> use convertPoint:FromView: to get the location in the text view, then tell the view's layout manager to return glyphIndexForPoint:inTextContainer:. You then call characterIndexForGlyphAtIndex: to convert from a glyph index to a char index

Actually, you can probably just call characterIndexForInsertionAtPoint: on the text view instead.

--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Re: Is it possible to get mouse click position in Scroll View? (From: phil stokes <email@hidden>)
 >Re: Is it possible to get mouse click position in Scroll View? (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Is it possible to get mouse click position in Scroll View?
  • Next by Date: What's the difference in these?
  • Previous by thread: Re: Is it possible to get mouse click position in Scroll View?
  • Next by thread: What's the difference in these?
  • Index(es):
    • Date
    • Thread