Variable window size based on screen resolution

2011-11-14 Thread Koen van der Drift
Is there a way to a window open in a size relative to the resolution of the screen? For instance, I am writing an app on a MacBook with a 13 screen. On my screen, the main window is almost the size of the complete screen. What happens if someone on a 21 iMac opens the application? Will the main

Re: Variable window size based on screen resolution

2011-11-14 Thread Richard Somers
One way would be to subclass NSWindow and override the designated initializer -initWithContentRect:styleMask:backing:defer: method. In the initializer you could query the screen resolution and set the window frame accordingly. --Richard On Nov 14, 2011, at 8:10 AM, Koen van der Drift wrote:

Re: Variable window size based on screen resolution

2011-11-14 Thread Jens Alfke
On Nov 14, 2011, at 7:18 AM, Richard Somers wrote: One way would be to subclass NSWindow and override the designated initializer -initWithContentRect:styleMask:backing:defer: method. In the initializer you could query the screen resolution and set the window frame accordingly. That seems