Re: clicking in text
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