• 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: Dragging a Control IB Style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging a Control IB Style


  • Subject: Re: Dragging a Control IB Style
  • From: Allan Odgaard <email@hidden>
  • Date: Sun, 2 May 2004 08:43:35 +0200

On 1. May 2004, at 17:31, Moray Taylor wrote:

You know how you can drag controls to a window in IB, how is that implemented? I know how to drag from an NSTableView, but how would a drag from an NSImageView (for example).

You need to overload mouseDragged: for the view which needs to be dragged and then invoke dragImage:at:offset:event:pasteboard:source:slideBack: to start the drag (see NSView documentation for details).

To get an image which resemble the control being dragged, you can use initWithFocusedViewRect: (see the NSBitmapImageRep documentation). But IB is not showing you the actual controls, but just pictures of these,





--
et al: used as an abbreviation when referring to a number of people, for
example: "It has been improved by Knuth et al." [syn: and others, et alii]

etc: continuing in the same way [syn: and so forth, and so on, et cetera].
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Dragging a Control IB Style (From: Moray Taylor <email@hidden>)

  • Prev by Date: Re: OT? Why are list archive search results so lame?
  • Next by Date: Re: Cocoa everywhere?
  • Previous by thread: Dragging a Control IB Style
  • Next by thread: Re: Injecting an NSResponder into the responder chain
  • Index(es):
    • Date
    • Thread