• 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: Strange results when resizing window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange results when resizing window


  • Subject: Re: Strange results when resizing window
  • From: Shawn Erickson <email@hidden>
  • Date: Fri, 14 Jan 2005 12:34:04 -0800


On Jan 14, 2005, at 12:13 PM, Austin Sarner wrote:

Hey,

I have a preferences style window that uses a toolbar for switching between panes in a tab view. This works fine, but I tried to implement resizing - and it resizes, but in a very odd way. It resizes everything from the bottom as opposed to the top. If anyone could point me in the right direction (I have messed with the origin of the nsrect but with no success). I'm looking for resizing similar to that in the preferences of mail.app. Thanks a bunch and if its something really simple then please excuse my ignorance ;).

NSRect myRect;
myRect = [mainWindow frame];
myRect.size.width = 546;
myRect.size.height = 301 + toolbarHeight;
[mainWindow setFrame:myRect display:YES animate:YES];


Note in Cocoa and Quartz2D the origin for window and view coords, etc. is normally the lower left corner not the upper left corner. In other words the origin for the window is the lower left corner and increasing heigh doesn't change this origin but the window bounds which in this case grows it vertically up the screen.

So you need to modify not only the height but also y.

-Shawn
 _______________________________________________
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

References: 
 >Strange results when resizing window (From: Austin Sarner <email@hidden>)

  • Prev by Date: Strange results when resizing window
  • Next by Date: Re: Finding the sender of an AppleEvent in Cocoa app on 10.2.8 or greater
  • Previous by thread: Strange results when resizing window
  • Next by thread: Re: Strange results when resizing window
  • Index(es):
    • Date
    • Thread