• 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: how to make an NSWindow unmovable...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >how to make an NSWindow unmovable... (From: Philip George <email@hidden>)

  • Prev by Date: how to make an NSWindow unmovable...
  • Next by Date: NSTextView setRulerVisible: weirdness
  • Previous by thread: how to make an NSWindow unmovable...
  • Next by thread: Re: how to make an NSWindow unmovable...
  • Index(es):
    • Date
    • Thread