• 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
Re: size of the gray bar at the top of an NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: size of the gray bar at the top of an NSWindow


  • Subject: Re: size of the gray bar at the top of an NSWindow
  • From: Clark Cox <email@hidden>
  • Date: Thu, 25 Sep 2003 10:25:47 -0400

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Thursday, Sep 25, 2003, at 09:38 US/Eastern, Damien Pacaud wrote:

hi list,
I am unable to find the size(in pixels) of the litle gray title bar on the top of an NSWindow...
does anyone have a pointer to that information ?
I need this info in order to resize my image(inside the window) so that it fits the screen.
I get the visible frame of the screen but when I aply the size modifications, it's about 25 pixels too high
I'd like to know the real size since 25 is not the exact one and I don't like hardcoded integers that just come out of my head or out of a serie of tests...

Use the methods (on the NSWindow class):

+ (NSRect)frameRectForContentRect:(NSRect)cRect styleMask:(unsigned int)aStyle;
+ (NSRect)contentRectForFrameRect:(NSRect)fRect styleMask:(unsigned int)aStyle;

This way, your code will be robust enough to support future changes to the window layouts.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iEYEARECAAYFAj9y+vEACgkQZ+zIIbXiIoMMPwCgppOH9RsAUvb+aWlairSG+pyb
1mkAoInnhojsZezHFgH4vX6Uy6gHkbCM
=iL8u
-----END PGP SIGNATURE-----
_______________________________________________
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.

References: 
 >size of the gray bar at the top of an NSWindow (From: Damien Pacaud <email@hidden>)

  • Prev by Date: Re: Problem on dual-processor Macs
  • Next by Date: Re: Problem on dual-processor Macs
  • Previous by thread: size of the gray bar at the top of an NSWindow
  • Next by thread: Same code, tool and app behave differently.
  • Index(es):
    • Date
    • Thread