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

Re: Default Window Centering


  • Subject: Re: Default Window Centering
  • From: j o a r <email@hidden>
  • Date: Sun, 19 Oct 2003 22:14:11 +0200

I don't think you can do this without some code. Uncheck the checkbox in IB where you set the window to automatically display when loaded from the nib file, and add these lines to the awakeFromNib method of the object loading the nib file:

[myWindowOutlet center];
[myWindowOutlet makeKeyAndOrderFront: nil];

j o a r

On 2003-10-19, at 21.57, James Masasaki wrote:

I have a Project Builder app that has a single one-shot window in my NIB file. When my application starts, I want to have this window auto-center itself on the main monitor. Is there a way to set this from within Interface Builder without writing any code?
_______________________________________________
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.

References: 
 >Default Window Centering (From: James Masasaki <email@hidden>)

  • Prev by Date: Help Viewer crashes under 10.1
  • Next by Date: Re: question about frame and bounds
  • Previous by thread: Default Window Centering
  • Next by thread: Help Viewer crashes under 10.1
  • Index(es):
    • Date
    • Thread