Re: Drag from view with nested view content
Re: Drag from view with nested view content
- Subject: Re: Drag from view with nested view content
- From: Brian Webster <email@hidden>
- Date: Fri, 2 May 2003 09:35:17 -0500
On Thursday, May 1, 2003, at 03:42 PM,
email@hidden wrote:
I have a custom view that contains other views, yet I want to initiate
a drag
from the entirety of the top view (command clicking anywhere within
the top
view starts a drag). What is the easiest/simplest way to marshall
all the
mouseDown handling to get this to happen? Do I need to override
mouseDown:
with all the interior views and pass control up to the superview?
Some of
the interior views need to respond to clicks. Command clicks would
start a
drag.
You should override the hitTest: method (declared in NSView) in your
top view. This method is called to determine which view a mouse event
should be sent to. If you want to hide clicks from the subviews in
some instances, just return self in those cases, and return [super
hitTest:theEvent] in others.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.