Drag image of NSView
Drag image of NSView
- Subject: Drag image of NSView
- From: Ken Tozier <email@hidden>
- Date: Fri, 14 Oct 2005 22:59:48 -0400
I'm sure this is an easy one but the Apple Drag and Drop info located
here "http://developer.apple.com/documentation/Cocoa/Conceptual/
DragandDrop/index.html?http://developer.apple.com/documentation/Cocoa/
Conceptual/DragandDrop/DragandDrop.html" gives no indication of how
to actually create a transparent snapshot of an NSView for use as a
drag image.
The documentation for NSView's
dragImage:at:offset:event:pasteboard:source:slideBack: method shows
the following snippet for getting the image
[pboard setData:[[self image] TIFFRepresentation]
forType:NSTIFFPboardType];
[self dragImage:[self image] at:[self imageLocation]
offset:dragOffset event:theEvent pasteboard:pboard source:self
slideBack:YES];
Problem is though, NSView has no "image" method. Nor do it's
superclasses "NSResponder" or "NSObject" so where are they getting
the image? Is this some deprecated method of NSView?
Anyway. If there is some better documentation around or if someone
could provide a simple code snippet of how to get a transparent image
of a view for a drag icon, it would be much appreciated
Thanks for any help
Ken
_______________________________________________
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