• 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
How to constrain the dragging of a window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to constrain the dragging of a window


  • Subject: How to constrain the dragging of a window
  • From: Quentin Mathé <email@hidden>
  • Date: Sat, 9 Nov 2002 01:53:31 +0100

I want to constrain the dragging of a window in order to have only the vertical movements possible.
I have tried to override NSWindow and setFrame:display: and setFrameOrigin methods, but I see no changes.
I have also tried without success to implement delegate methods like windowDidMove: or windowWillMove:, that doesn't constrain the movement of the window : the window moved then the window is snapping to the position I set.
Perhaps I can subclass NSEvent (to modify the mouseDragged event on the fly) and use poseAsClass method to obtain the behavior I want but I don't know how to do it.
Is anybody having an idea ?

--
Quentin Mathi
email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: How to constrain the dragging of a window
      • From: Kristin Webster <email@hidden>
  • Prev by Date: Re: Calling a unix command from Cocoa ?
  • Next by Date: Re: Calling a unix command from Cocoa ?
  • Previous by thread: dealloc
  • Next by thread: Re: How to constrain the dragging of a window
  • Index(es):
    • Date
    • Thread