• 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
Changing whether sheet is resizable.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: Mimic Finder File Listing
  • Next by Date: Future Objective-C changes
  • Previous by thread: Re: me and my shadow
  • Next by thread: Future Objective-C changes
  • Index(es):
    • Date
    • Thread