Re: Making an NSWindow Resizable
Re: Making an NSWindow Resizable
- Subject: Re: Making an NSWindow Resizable
- From: Kevin Ballard <email@hidden>
- Date: Wed, 17 Mar 2004 15:14:54 -0500
I haven't ever actually *tried* this, but couldn't you use Carbon and do
ChangeWindowAttributes([myWindow windowRef], kWindowResizableAttribute,
kWindowNoAttributes);
On Mar 17, 2004, at 4:42 AM, Shaun Wexler wrote:
On Mar 17, 2004, at 12:25 AM, Daniel Todd Currie wrote:
Is there any way to programmatically make an NSWindow resizable,
without re-initializing it? It would seem what is missing from the
NSWindow API, is a -setStyleMask: method.
NSWindows are complex beasts, eh? There are two easy ways you can
accomplish what it is I think you're asking: (1) create resizable
windows, and use the NSWindow delegate method
-windowWillResize:toSize: to constrain the frame so the user is unable
to resize it when appropriate, or (2) simply create a new resizable
window with the same frame, [newWindow setContentView:[oldWindow
contentView]], then close the old window. YMMV. ;)
--
Kevin Ballard
email@hidden
http://www.tildesoft.com
http://kevin.sb.org
_______________________________________________
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.