Re: Respond to Click in TextView
Re: Respond to Click in TextView
- Subject: Re: Respond to Click in TextView
- From: Michael Terry <email@hidden>
- Date: Sun, 27 Aug 2006 09:30:28 -0700
On Aug 27, 2006, at 5:46 AM, Michael Ash wrote:
Now, solutions:
1) If what you care about is moving the insertion point around or
changing the selection, look at
NSTextViewDidChangeSelectionNotification. The insertion point is
counted as a zero-size selection, so this gets fired for moving the
insertion point too.
2) If you really need all mouse down events, even the ones that don't
move the insertion point, subclass NSView and override mouseDown:.
Don't forget to call super in the cases where you need the default
behavior.
Thanks very much. I intend to change the background color of any text
selected by a shift click. Unless you have any better idea, it looks
like option 2 will work.
Michael
_______________________________________________
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