Changing whether sheet is resizable.
Changing whether sheet is resizable.
- Subject: Changing whether sheet is resizable.
- From: Jan Van Tol <email@hidden>
- Date: Thu, 15 May 2003 23:03:08 -0500
List,
I'm trying to dynamically change whether a sheet is resizable,
depending on what I'm displaying in it. I gather that the only way to
truly change whether a window is resizable or not is when you create
it, which isn't an option for me.
What I'm currently doing is hiding the resize indicator when I don't
want it, then implementing this:
- (NSSize)windowWillResize:(NSWindow *)sender
toSize:(NSSize)proposedFrameSize {
if (![sender showsResizeIndicator]) {
return [sender frame].size;
} else {
return proposedFrameSize;
}
}
This almost works. The sheet won't resize anymore, which is good, but
if you drag where the resize indicator usually is, the sheet still
moves around as if it was resizing. So it's moving around in order to
keep itself centered on it's parent window, or at least it would be
centered if I allowed it to resize. Now it just looks wacky.
Anyone have any ideas?
Thanks in advance,
-Jan Van Tol
_______________________________________________
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.