• 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: Respond to Click in TextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Re: Respond to Click in TextView
      • From: "Michael Ash" <email@hidden>
References: 
 >Respond to Click in TextView (From: Michael Terry <email@hidden>)
 >Re: Respond to Click in TextView (From: "Michael Ash" <email@hidden>)

  • Prev by Date: Re: how to display a window from separate nibs?
  • Next by Date: Artifacts during text selection
  • Previous by thread: Re: Respond to Click in TextView
  • Next by thread: Re: Re: Respond to Click in TextView
  • Index(es):
    • Date
    • Thread