Re:[Solution] Preventing a window from moving while dragging a view.
Re:[Solution] Preventing a window from moving while dragging a view.
- Subject: Re:[Solution] Preventing a window from moving while dragging a view.
- From: Tony Romano <email@hidden>
- Date: Thu, 7 Oct 2010 09:37:46 -0700
I found what I needed to do.
Implement in the custom view:
- (BOOL)mouseDownCanMoveWindow
{
return NO;
}
Tony Romano
http://www.cocoaegghead.com
On Oct 6, 2010, at 11:13 AM, Tony Romano wrote:
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
_______________________________________________
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