Re: Window Placement (The third)
Re: Window Placement (The third)
- Subject: Re: Window Placement (The third)
- From: Marco Binder <email@hidden>
- Date: Thu, 7 Nov 2002 18:49:19 +0100
Sorry for splitting the answer in three (slow thinking today- or too
fast typing, i dunno):
you do know, that the origin of your frame is its lower left corner, do
you? You need at least 1500 pixels of vertical resolution on your
mainscreen to completly fit your window on it (purely theoretical
calculation, not including menubar and dock) if you place its origin at
screen-height/2 - 250 (=750-250 = 500 = your windows height)...
marco
Am Donnerstag, 07.11.02 um 12:56 Uhr schrieb email@hidden:
I'm trying to use the following code to get a perfect placement for my
window:
NSRect *d;
NSScreen *screen = [NSScreen mainScreen];
d = [screen frame];
[[winControl window] setFrame:[NSRect x:[[d width]/2-500/2] y:[[d
height]/2-500/2] w:700 h:500] display:NO];
But for some reason I get 2 errors trying to run it:
following
AppController.m:121: incompatible types in assignment
AppController.m:122: parse error before "NSRect"
Any ideas?
_______________________________________________
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.
--
|\ /| E-Mail: email@hidden WWW: www.marco-binder.de
| \/ | Telefon: 07531 / 94 19 94 Fax: 07531 / 94 19 92
| |ARCO Snail-Mail: Banater Str. 3 - 78467 Konstanz
BINDER _____________________________________________________
_______________________________________________
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.