disappearing controls after custom Zoom
disappearing controls after custom Zoom
- Subject: disappearing controls after custom Zoom
- From: Jake <email@hidden>
- Date: Thu, 29 Nov 2001 18:07:55 -0500 (EST)
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