Preventing a window from moving while dragging a view.
Preventing a window from moving while dragging a view.
- Subject: Preventing a window from moving while dragging a view.
- From: Tony Romano <email@hidden>
- Date: Wed, 6 Oct 2010 11:13:53 -0700
I have a NSPanel with a NSToolbar and a tabless NSTabView to create an inspector. The NSToolbarItems for the NSToolbar use a custom view. This all works as expected.
I am trying to implement drag/drop to move toolbar items to/from different Inspector Panels to allow the user to customize their inspectors. I've added the needed mouseDown and mouseDragged method in addition to the draggingSourceOperationMaskForLocal:. When the drag operation begin during the mouseDragged: event, the NSPanel window is moving as well. I am not calling the super implementation.
Question: How do I prevent the Panel from moving during the drag operation? Do I need to use a modal loop?
Thanks!
Tony Romano
http://www.cocoaegghead.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden