Moving windows across multiple monitors
Moving windows across multiple monitors
- Subject: Moving windows across multiple monitors
- From: Antoine McNamara <email@hidden>
- Date: Fri, 09 Aug 2002 16:04:04 -0700
I have a window in IB that I want to move over to a second monitor, but
[window setFrameOrigin] (and [window setFrame]) has no effect if the new
origin results in the window completely leaving the main monitor. For
example, the following program doesn't move the window:
@interface Controller : NSObject
{
IBOutlet NSWindow *window; // 480 x 360 window from IB
}
@end
@implementation Controller
-(void) awakeFromNib {
NSPoint origin;
origin.x = -500;
origin.y = 100;
[window setFrameOrigin:origin];
}
@end
but if "origin.x" is set to -400 (or anything up to -479), it works fine
and moves the window partially onto the other display. Is this behavior
normal (it happens in both 10.1 and Jaguar)? How would you suggest
going about moving a window into the center of a second monitor? Thanks,
Antoine McNamara - email@hidden
Pixar Animation Studios
_______________________________________________
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.