• 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
NSWindow resizing to incorrect height
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWindow resizing to incorrect height


  • Subject: NSWindow resizing to incorrect height
  • From: Michael Jurewitz <email@hidden>
  • Date: Wed, 15 Jun 2005 13:39:24 -0500

I have the following method for taking the size of a new view to be transitioned to and resizing the window appropriately:

- (void)resizeWindowToSize: (NSSize)newSize
{
    NSRect aFrame;

    

    float newHeight = newSize.height;
    float newWidth = newSize.width;

    

    aFrame = [NSWindow contentRectForFrameRect:[mainWindow frame] styleMask:[mainWindow styleMask]];

    

    aFrame.origin.y += aFrame.size.height - newHeight;
    aFrame.size.height = newHeight;
    aFrame.size.width = newWidth;

    

    aFrame = [NSWindow frameRectForContentRect:aFrame styleMask:[mainWindow styleMask]];

    

    [mainWindow setFrame:aFrame display:YES animate:YES];
}

There seems to be an issue, I think related to the window styleMask, that makes the NSWindow transition to a window height that is too short, causing the view to get slightly squished.  I'm using a unified toolbar view along with icons that have text below them.  Can anyone see what might be causing this to happen or offer some suggestions?

-Michael Jurewitz

*********************************************

Northwestern University


2341 Sheridan Road

Evanston, IL

60201


Room:  847-332-9515

Cell:  909-717-5474

*********************************************




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSWindow resizing to incorrect height
      • From: Kristin Forster <email@hidden>
  • Prev by Date: Re: Cocoa-dev Digest, Vol 2, Issue 906
  • Next by Date: Re: NSWindow resizing to incorrect height
  • Previous by thread: Re: Cocoa-dev Digest, Vol 2, Issue 906
  • Next by thread: Re: NSWindow resizing to incorrect height
  • Index(es):
    • Date
    • Thread