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

Re: clicking in text


  • Subject: Re: clicking in text
  • From: "D.K. Johnston" <email@hidden>
  • Date: Mon, 10 Jul 2006 09:16:48 -0700

On 10 Jul, 2006, at 08:00, Roland Silver wrote:

Can anyone tell me (or give me a reference that will tell me) how to organize the text in an NSTextView into sections so that when the user clicks on text in a section, a method is invoked which can do something about the click, knowing which section it occurred in?

Sending selectedRange to the NSTextView will give you the range where the mouse was clicked. Put this call in textViewDidChangeSelection: in the NSTextView's delegate. You'll need to know the range of each section in the NSTextView's string.


dkj

_______________________________________________
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


  • Prev by Date: Re: Objects as keys NSMutableDictionary
  • Next by Date: Disable sort in a bound tableview with relationships
  • Previous by thread: clicking in text
  • Next by thread: Disable sort in a bound tableview with relationships
  • Index(es):
    • Date
    • Thread