• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re:[Solution] Preventing a window from moving while dragging a view.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Preventing a window from moving while dragging a view. (From: Tony Romano <email@hidden>)

  • Prev by Date: Re: How does Popup menu receive keyboard events?
  • Next by Date: Re: reused tableViewCell UILabel text is deallocated but not nil ??
  • Previous by thread: Preventing a window from moving while dragging a view.
  • Next by thread: NanoStore has moved to Google Code
  • Index(es):
    • Date
    • Thread