Re: Initial Window position
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.