Re: window resize problem (NSMinX(windowFrame), NSMaxY(windowFrame)
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.