Re: window resizing events
Re: window resizing events
- Subject: Re: window resizing events
- From: "Louis C. Sacha" <email@hidden>
- Date: Fri, 30 Apr 2004 19:20:37 -0700
Hello...
You could also use the NSView instance method inLiveResize during
drawRect: to determine whether to draw or not...
- (void)drawRect:(NSRect)aRect
{
if (![self inLiveResize])
{
/* insert normal drawing code here */
}
}
You might also be able to do a similar check in setFrame: and scale
the image is inLiveResize returns FALSE, which would take care of the
case when the window is maximized and the rest of the general cases
where the view is resized. (I think you would still need to scale the
image in viewDidEndLiveResize, since if I remember correctly, the
final setting of the frame when the window is drag resized is done
while inLiveResize still returns TRUE, but this should be fairly easy
to verify)
Hope that helps,
Louis
I played around with viewDidEndLiveResize some more. It works great
for actual resizing with the mouse. However, hitting the maximize
button doesn't seem to work with viewDidEndLiveResize. Is there
another method for handling the maximize button. To be more clear,
it's the green button with the plus sign in the top left of every
window.
Thanks,
David
On Apr 30, 2004, at 3:03 PM, matt neuburg wrote:
On Fri, 30 Apr 2004 09:56:09 -0700, "David Piasecki" <email@hidden>
said:
I'm trying to figure out how to monitor window resizing events such
that my NSView doesn't redraw until the user has finished resizing the
window and let go of the mouse. I was also trying to figure out how to
stretch or shrink an image as its NSImageView is resized.
Did you read about viewDidEndLiveResize? m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
_______________________________________________
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.