Re: Building a view transparent to dragging
Re: Building a view transparent to dragging
- Subject: Re: Building a view transparent to dragging
- From: Cameron Hendrix <email@hidden>
- Date: Mon, 24 Oct 2005 06:11:16 -0700
Although drawing both image and border in one class would be a more efficient use of system resources, I think I've done something similar to what you're talking about, although not with NSImageViews.
If I understand you correctly, what you want to do is to be able to drag and drop an image without the NSImageView on top grabbing it. One thing you might be able to try is the setEditable:NO method on your imageview that draws the border. Then, it wouldn't be able to take the image that you drag to it, and the image may pass on to the ImageView below.
I actually had a view that sat on top of an NSImageView that drew a border using NSBezierPath, etc., and I was able to drag and drop things to it just fine.
Cameron
On Monday, October 24, 2005, at 00:01AM, Jerome Foucher <email@hidden> wrote:
>Hi list,
>
>I'd like to build a custom subclass of NSImageView that is
>transparent to dragging.
>
>My custom view is used to draw borders around an NSImageView. It's
>positionnned on top of the image in the view hierarchy, and draws a
>PNG with alpha mask to draw the border.
>
>The image view behind the custom view supports drag&drop, so the user
>can drag an image file from the Finder and drop it into the image frame.
>However, the custom border view intercepts all drags....
>
>For various reasons, I'd like to avoid having to build a class that
>draws the border AND the image itself.
>
>Does anybody have a solution ?
>
>Thanks
>Jérome _______________________________________________
>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
>
>
_______________________________________________
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