• 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: Rearranging NSWindows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rearranging NSWindows


  • Subject: Re: Rearranging NSWindows
  • From: Brian Webster <email@hidden>
  • Date: Mon, 29 Jul 2002 20:17:12 -0500

On Monday, July 29, 2002, at 03:41 PM, cocoa-dev-
email@hidden wrote:

I've got a document-based app which can contains lots of documents :
therfore it would be useful to be able to rearrange windows on the screen,
that's to say, i.e. Change their position and size so that their height is
the same, then position their properly so that we can talke a look at each
window content (I mean if each window has an height of 50 pixels, place the
first one at the top of the screen, the second 50 pixels under, etc...)

There's no "automagic" method to do this, but it certainly is doable. You'll want to use NSWindow's setFrame: method to set the position and size of a window. You can also use +[NSWindow contentRectForFrameRect:styleMask:] to calculate the height of the title bar, since that can vary with different themes. -[NSWindow constrainFrameRect:toScreen:] is also useful for making sure your window's don't go off the screen, under the dock, etc.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

  • Prev by Date: Re: Changing the shape of NSButton
  • Next by Date: NSView subclass initialFirstResponder questions
  • Previous by thread: Re: Rearranging NSWindows
  • Next by thread: More efficient solution than DO?
  • Index(es):
    • Date
    • Thread