Re: Window Placement
Re: Window Placement
- Subject: Re: Window Placement
- From: Ondra Cada <email@hidden>
- Date: Fri, 8 Nov 2002 01:43:56 +0100
On Thursday, November 7, 2002, at 06:21 , Jonathan E. Jackel wrote:
NSScreen *screen = [NSScreen mainScreen];
NSRect d = [screen frame];
NSRect newRect;
newRect.size.height = 500;
newRect.size.width = 700;
newRect.origin.x = d.size.width/2 - newRect.size.width/2;
newRect.origin.y = d.size.height/2 - newRect.size.height/2;
[[winControl window] setFrame:newRect display:NO];
You could also use the NSMakeRect() function to set up the new frame.
You could also use -[NSWindow center] ;)
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.