Re: Making an NSWindow Resizable
Re: Making an NSWindow Resizable
- Subject: Re: Making an NSWindow Resizable
- From: Daniel Todd Currie <email@hidden>
- Date: Wed, 17 Mar 2004 15:47:43 -0800
Yes, I just tried this last night, but it didn't work. My lamentable
foray into the world of Carbon produced some rather odd results...
ChangeWindowAttributes() as you describe returned noErr,
GetWindowClass() gives me kDocumentWindowClass, and GetWindowAttribute
confirmed that kWindowResizableAttribute had been set.
However, the window never became resizable. I couldn't begin to guess
why, but it would seem that there are attributes of NSWindow that
Carbon can't touch.
On 2004 Mar 17, at 12:14, Kevin Ballard wrote:
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.
_______________________________________________
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.