Re: Window resize by blob, not by resize corner
Re: Window resize by blob, not by resize corner
- Subject: Re: Window resize by blob, not by resize corner
- From: email@hidden
- Date: Sat, 22 Mar 2003 14:27:15 +0100
On samedi, mars 22, 2003, at 01:00 PM, j o a r wrote:
Hej,
This is probably an easy question, but here goes:
I would like to have a window zoomable by the green-blob-button, but
not via the resize corner. How to do achieve this?
The obvous choice seems to be to call "setShowsResizeIndicator:" with
NO, but strangely enough the window can still be resized from the
lower right corner. The resize button is just hidden, not disabled. I
think that this is in accordance with the documented behavour, but I
still think it's weird.
Work arounds, hacks, anything would be much appreciated!
Yes this can be done. You need to cheat the Window implementing this in
its delegate:
- (BOOL)windowShouldZoom:(NSWindow *)sender toFrame:(NSRect)newFrame
{
NSRect tRect;
// Compute the frame you want
tRect=[sender frame];
tRect.size.height+=10;
tRect.origin.y-=10;
[sender setFrame:tRect display:YES];
return NO;
}
- (NSSize)windowWillResize:(NSWindow *)sender
toSize:(NSSize)proposedFrameSize
{
return [sender frame].size;
}
_______________________________________________
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.