• 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: Dragging my NSWindow subclass like an ordinary OS X window...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging my NSWindow subclass like an ordinary OS X window...


  • Subject: Re: Dragging my NSWindow subclass like an ordinary OS X window...
  • From: Tom Sutcliffe <email@hidden>
  • Date: Sun, 25 May 2003 15:25:27 +0100

You want to override acceptsFirstMouse in the NSView you want to be draggable. The NSView docs can probably explain its use better than me!

If you don't have any NSViews that you want this behaviour in, you can just use setMovableByWindowBackground as Chris said.

Regards,

Tom

On Sunday, May 25, 2003, at 02:57 pm, Chris Ridd wrote:

On 25/5/03 1:02 pm, Giovanni Donelli <email@hidden> wrote:

Hello Gurus!
I have sub-classed the NSWindow and I have now a window with my own
shape and that you can drag clicking on any part of the window as it
happens with a brush metal window...

Unfortunately in order to move the window you have to click twice, one
click for put the window in foreground and an other click for drag it.

Now the problem is that I would like my window to move at the first
click-and-drag like it happen with a ordinary window of Mac OS X
clicking on the window bar.

Is there a way to enable the the mouseDragged event on background
window? or any suggesting to solve the problem?

Does calling NSWindow's -setMovableByWindowBackground: method help?

Cheers,

Chris
_______________________________________________
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.
_______________________________________________
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: Dragging my NSWindow subclass like an ordinary OS X window...
      • From: Giovanni Donelli <email@hidden>
References: 
 >Re: Dragging my NSWindow subclass like an ordinary OS X window... (From: Chris Ridd <email@hidden>)

  • Prev by Date: Re: Finder-like interface
  • Next by Date: Re: Finder-like interface
  • Previous by thread: Re: Dragging my NSWindow subclass like an ordinary OS X window...
  • Next by thread: Re: Dragging my NSWindow subclass like an ordinary OS X window...
  • Index(es):
    • Date
    • Thread