RE: placing a window in the top left corner
Did you look at -[NSScreen visibleFrame]? "The returned rectangle is always based on the current user-interface settings and does not include the area currently occupied by the dock and menu bar. Because it is based on the current user -interface settings, the returned rectangle can change between calls and should not be cached." EG > I have come across two methods in NSWindow, they are: > - setFrameTopLeftPoint: > and > - cascadeTopLeftFromPoint: > But these require a point as input. > How do I calculate this point? > Also if the user has the dock vertical on the left side, how do I > adjust for that? > What if the user has different resolution like 800x600? This message and any attachments (the "message") are confidential and intended solely for the addressee(s). Any unauthorised use or dissemination is prohibited. E-mails are susceptible to alteration. Neither DxO Labs nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified. Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisee est interdite. Tout message electronique est susceptible d'alteration. DxO Labs et ses filiales declinent toute responsabilite au titre de ce message s'il a ete altere, modifie ou falsifie. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
Re: placing a window in the top left corner
Wouldn't the point just be 0, 0 in that case? I'm a beginner so I am not positive. On Nov 19, 2008, at 9:47 AM, Nick Rogers wrote: Hi, whenever my app opens a second preview window, I want it to be positioned at the top left corner of the desktop screen. I have come across two methods in NSWindow, they are: – setFrameTopLeftPoint: and – cascadeTopLeftFromPoint: But these require a point as input. How do I calculate this point? Also if the user has the dock vertical on the left side, how do I adjust for that? What if the user has different resolution like 800x600? Thanks, Nick___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/codebowl%40gmail.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
placing a window in the top left corner
Hi, whenever my app opens a second preview window, I want it to be positioned at the top left corner of the desktop screen. I have come across two methods in NSWindow, they are: – setFrameTopLeftPoint: and – cascadeTopLeftFromPoint: But these require a point as input. How do I calculate this point? Also if the user has the dock vertical on the left side, how do I adjust for that? What if the user has different resolution like 800x600? Thanks, Nick___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]