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

Re: Initial Window position


  • Subject: Re: Initial Window position
  • From: "Douglas A. Welton" <email@hidden>
  • Date: Thu, 08 May 2003 08:57:57 -0400

Brooks,

Check the documentation for NSWindow. You will find, at least, two very
useful method:

- (void)center
- (NSPoint)cascadeTopLeftFromPoint:(NSPoint)topLeftPoint

-center does the obvious, and -cascadeTopLeftFromPoint can be easily used
with -setFrameTopLeftPoint if you have a multi-window application. Also -
see the plethora of setFrame... methods in the NSWindow documentation.

NOTE: You can always lock the window's frame in IB.

on 5/7/03 11:55 AM, Brooks Bell at email@hidden wrote:

> Is there a built in facility in Cocoa for initial window positioning? The
> non-panel windows I've got seem to be coming up wherever I left them in the
> nib.
>
> Along the same lines, if the saved window position in the prefs ends up off
> the screen (as when someone has changed their monitor layout between runs)
> will Cocoa automatically snap the windows back to the visible area?
>
> Failing a built in facility for these things does anyone have a link to
> avoid reinventing the wheel?
_______________________________________________
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: 
 >Initial Window position (From: Brooks Bell <email@hidden>)

  • Prev by Date: Re: Song dragged from iTunes
  • Next by Date: NSTableView as first responder
  • Previous by thread: Re: Initial Window position
  • Next by thread: Re: _newFirstResponderAfterResigining ???
  • Index(es):
    • Date
    • Thread