Re: how to make an NSWindow unmovable...
Re: how to make an NSWindow unmovable...
- Subject: Re: how to make an NSWindow unmovable...
- From: Jérome Foucher <email@hidden>
- Date: Sun, 12 Jun 2005 10:15:06 +0200
On 12 juin 05, at 09:10, Philip George wrote:
is there some sort of setMovable: method that i can call to make an
NSWindow with a titlebar unmovable?
Not to my knowledge.
i realize i can catch NSWindowDidMoveNotification and move the
window back, but that's kinda cludgy.
is there a simpler way?
Simpler, I don't know, but here is what I've done for one of my apps,
assuming your window is not a metal window, and thus can only be
dragged with it titlebar :
- create a fully transparent window, with no title bar. Let's call
it the shield window.
- resize it and position it so that it exactely matches your
window's titlebar
- add the shield window as a child window of your main window
- make it so that even the shield window is transparent, it
responds to mouse clicks
That should do the trick.
Jérome
_______________________________________________
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