Skip navigation.
 
mlRe: Newbie: window resize aloud with code?
FROM : Keary Suska
DATE : Thu Aug 31 19:11:10 2006

on 8/30/06 12:55 PM, marcus.<email_removed> purportedly said:

> I have a window that is not resizable, but pressing a button should
> make the user able to resize the window. How do I set resizable aloud
> or not with code?


I don't think NSWindow has a method of allowing/disallowing window resize. I
don't think IB has one either. I believe the way it is done behind the
scenes is to set the minimum size and maximum size to the same value. This
would have the effect of disallowing, while setting min/max to other
arbitrary values would allow resize. I think this approach might hide the
resize control, but I don't recall.

You could also have a delegate implement -windowWillResize:toSize:, but it
might not be elegant.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

Related mailsAuthorDate
mlNewbie: window resize aloud with code? Marcus Pedersén Aug 30, 20:55
mlRe: Newbie: window resize aloud with code? PGM Aug 31, 00:12
mlRe: Newbie: window resize aloud with code? Keary Suska Aug 31, 19:11
mlRe: Newbie: window resize aloud with code? Michael Jurewitz Aug 31, 20:03