• 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: NSWindow Centering Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow Centering Problem


  • Subject: Re: NSWindow Centering Problem
  • From: Gregory Weston <email@hidden>
  • Date: Wed, 7 May 2008 15:51:51 -0400

Philip Bridson wrote:

Can anyone tell me why when I use [MyWindow center] the window ends
up about an inch from the top of the screen? I thought this method is
meant to center the window. Is there something I am doing wrong?

The documentation for NSWindow>>center explicitly notes that the window will actually end up higher than perfectly centered. Why it's "about an inch from the top of the screen" probably depends quite a bit on the physical size and pixel size of the display, the pixel size of the window in question and whatever algorithm and magic numbers Apple's using to determine how far to offset the window vertically.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: NSWindow Centering Problem
  • Next by Date: Re: NSWindow Centering Problem
  • Previous by thread: Re: NSWindow Centering Problem
  • Next by thread: Avoiding NSAccessibilityException?
  • Index(es):
    • Date
    • Thread