• 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: NSTextView Drag and Drop (Colors)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView Drag and Drop (Colors)


  • Subject: Re: NSTextView Drag and Drop (Colors)
  • From: Seth Willits <email@hidden>
  • Date: Fri, 2 Jun 2006 21:41:39 -0700

On Jun 2, 2006, at 3:55 PM, Satoshi Matsumoto wrote:

I'm dragging a color from the standard color panel into a NSTextView
and having it drop the hex rgb equivalent. What's the right way of
getting the insertion point to move around while dragging and stay
unchanged if the drag is aborted?

In order to get the character index of the dropped location, override the
method performDragOperation: as below:

I want it to appear as though its dragging text so the cursor needs to move in the field _during_ the drag as well. Should I call the drawInsertionPointInRect:color:turnedOn: myself from draggingUpdated:? I'll have to keep the rect of the position it was last drawn at and erase it from there and draw it in the new location as well. Think it'll work/is the right way to go about it?



Thanks,


-- Seth Willits _______________________________________________ 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: NSTextView Drag and Drop (Colors)
      • From: Satoshi Matsumoto <email@hidden>
References: 
 >Re: NSTextView Drag and Drop (Colors) (From: Satoshi Matsumoto <email@hidden>)

  • Prev by Date: Re: Populate NSPopUpButton
  • Next by Date: Re: Putting object references into Pasteboard for Drag And Drop
  • Previous by thread: Re: NSTextView Drag and Drop (Colors)
  • Next by thread: Re: NSTextView Drag and Drop (Colors)
  • Index(es):
    • Date
    • Thread