• 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: Centering a window ... not in the usual way!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Centering a window ... not in the usual way!


  • Subject: Re: Centering a window ... not in the usual way!
  • From: Trygve Inda <email@hidden>
  • Date: Wed, 13 May 2009 16:21:19 +0000
  • Thread-topic: Centering a window ... not in the usual way!

> On Wed, May 13, 2009 at 4:20 AM, Mic Pringle <email@hidden> wrote:
>> Hi,
>>
>> I'm working on an application that when first started you are
>> presented with a small window showing a number of options. When any of
>> these options are chosen, the window fades out the contentView whilst
>> at the same time replacing it with and fading in the  new view. The
>> window also resizes to accommodate the new view. This is all achieved
>> using NSViewAnimation and works and looks great. However, I have one
>> small issue.
>>
>> What I'd like is for the resulting window (new size, containing new
>> view) to be centered on the screen, in the sameplace as if I'd called
>> [window center] on it.
>
> So... why can't you use [window center]?

I am not sure of Mic's intent, but [window center] is only useful for the
main screen. If you need per-screen windows, I am not sure how to have the
OS do it. Given a few different resolutions though, it should not be hard to
deduce the OS positioning algorithm.

And yes, setting the alpha to 0 (or any other value) affects the entire
window, frame and content.

Trygve


_______________________________________________

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

  • Follow-Ups:
    • Re: Centering a window ... not in the usual way!
      • From: Benjamin Stiglitz <email@hidden>
References: 
 >Re: Centering a window ... not in the usual way! (From: Michael Ash <email@hidden>)

  • Prev by Date: What header has enum for NSPOSIXErrorDomain?
  • Next by Date: Re: Subclassing breaks bindings?
  • Previous by thread: Re: Centering a window ... not in the usual way!
  • Next by thread: Re: Centering a window ... not in the usual way!
  • Index(es):
    • Date
    • Thread