• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Window resize by blob, not by resize corner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Window resize by blob, not by resize corner
      • From: j o a r <email@hidden>
References: 
 >Window resize by blob, not by resize corner (From: j o a r <email@hidden>)

  • Prev by Date: [ANN:] New test release of CocoaBasic compiler/interpreter available
  • Next by Date: Re: Window resize by blob, not by resize corner
  • Previous by thread: Window resize by blob, not by resize corner
  • Next by thread: Re: Window resize by blob, not by resize corner
  • Index(es):
    • Date
    • Thread