• 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: window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame)


  • Subject: Re: window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame)
  • From: Yann Bizeul <email@hidden>
  • Date: Mon, 14 Jun 2004 22:13:54 +0200

> [...] I dont
> want the window to move around though. I want it to stay in the same
> place. With what I have working now, the window resizes properly, but
> it moves to the bottom(about 2 inches up) left side of the screen. I
> dont believe the newWindowFrame = NSMakeRect(NSMinX(windowFrame),
> NSMaxY(windowFrame), 170, 85); code is working properly, using
> (NSMinX(windowFrame), NSMaxY(windowFrame) the resize should keep the
> window in the same position, but it is not.
Don't forget Windows frame is in Quartz coordinate system, so the
origin is the lower left corner.

> newWindowFrame = NSMakeRect(NSMinX(windowFrame), NSMaxY(windowFrame),
> 300, 85);
> newWindowFrame = NSMakeRect(NSMinX(windowFrame), NSMaxY(windowFrame),
> 170, 85);
In this example, since you do not change window's height, you shoud use
NSMinY in place of NSMaxY

About mouseEnter/mouseExit, don't forget to invalidate and reset your
cursor rect each time you resize the window.

--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
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: 
 >window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame) (From: Rhon Fitzwater <email@hidden>)

  • Prev by Date: How to refresh a directory view after a movePath
  • Next by Date: Re: How to refresh a directory view after a movePath
  • Previous by thread: window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame)
  • Next by thread: Re: window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame)
  • Index(es):
    • Date
    • Thread