Re: Stop dragging my <NSWindow> around
Re: Stop dragging my <NSWindow> around
- Subject: Re: Stop dragging my <NSWindow> around
- From: Matt Neuburg <email@hidden>
- Date: Thu, 03 Feb 2005 08:43:48 -0800
On Thu, 3 Feb 2005 13:32:31 +0000, Ken Tabb <email@hidden> said:
>I'm still trying to implement window snap-to-edge functionality with my
>panels (further to my "mouseDown/Up on window's titlebar?" post).
>Although the window doesn't get mouseDown / mouseUp called by default
>when you click / release the titlebar, overriding your window's
>-sendEvent: allows you to catch all mouseDowns / mouseUps.
I don't know if this will help, but what I do is eliminate the title bar.
Now I *do* get mouseDown / Up, because the user is actually dragging in the
content area. My implementation is not quite the same as what you want; I
simply permit the drag, then correct the position at the end, when the mouse
goes up. It is necessary to use "delayed performance" to do this:
[self performSelector:@selector(fixPosition) withObject:nil afterDelay:0.1];
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden