• 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
Moving windows across multiple monitors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Strings from UUID
  • Next by Date: Re: Adding items to right side of main menu
  • Previous by thread: Further GUI wrapper problems
  • Next by thread: Re: Adding items to right side of main menu
  • Index(es):
    • Date
    • Thread