Re: Stop dragging my <NSWindow> around
Re: Stop dragging my <NSWindow> around
- Subject: Re: Stop dragging my <NSWindow> around
- From: glenn andreas <email@hidden>
- Date: Thu, 3 Feb 2005 09:19:45 -0600
On Feb 3, 2005, at 7:32 AM, Ken Tabb wrote:
... to hijack a Stevie Nicks song title...
Hi folks,
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.
Why not try overriding the various setFrame calls instead, to lock them
to the edge as appropriate? You'd probably want to add "if dragging
the window" logic (say, by checking if the mouse was down).
After looking at the documentation, you might even be able to use
"windowWillResize" delegate message since that is called for manual
resizing as well as "through one of the setFrame... methods other than
setFrame:display:" (and then call setFrame:display: directly from
there your self to grid it)
It might be worth a try...
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
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