Re: Dragging a Control IB Style
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.