Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disappearing controls after custom Zoom



Trying to override the default zooming behavior, i implemented the
delegate -windowShouldZoom:toFrame: in the window controller, except I
returning NO all the time and ignores the newFrame parameter and do the
manual zooming in the code. something like

- (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame
{
NSRect newSize;
NSWindow *w;

w = [self window]
oldSize = [w frame];
newSize = oldSize;

newSize.size.height = myBestHeight;
newSize.size.width = myBestWidth;

[w setFrame:newSize display:YES animate:YES];

return NO;
}

while this worked great, I notice that if I set my width and height to be
smaller than the original windows size, some control that were obscured in
the smaller frame disappears when I make the window bigger again. The only
exception is that the TabView was not effected. I experiemented with
disabling the oneShot option, but didn't see a difference.

Can someone shed some light on this? Also, is this the right way to
override default zooming? Thanks.

Jake




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.