• 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
Re: sheet weirdness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sheet weirdness


  • Subject: Re: sheet weirdness
  • From: Jeremy Dronfield <email@hidden>
  • Date: Mon, 19 Apr 2004 20:55:39 +0100

Instead of setting the minSize of the window, you could set the contentMinSize. This should be unaffected by the removal of the title bar.

Regards,
Jeremy


On 19 Apr 2004, at 8:14 pm, Daniel Todd Currie wrote:

Ah that makes sense...

The problem I'm having is that I set the minSize of the window before it becomes a sheet, and then once it opens as a sheet, the minSize is actually 22 pixels larger. i.e. if I drag the resize widget, the sheet pops down 22 pixels before resizing in the desired direction (not good).

Would it be appropriate to just subtract 22 from the minSize when I set it initially? I don't like putting arbitrary numbers in my equations...

-- Daniel


On 2004 Apr 19, at 02:16, Jeremy Dronfield wrote:

The window isn't being resized. Your first log of [newVersionWindow frame].size is called on the window frame before it becomes a sheet; the extra 22 pixels in height is accounted for by the title bar. After it becomes a sheet, those 22 pixels aren't included, so the second call on [newVersionWindow frame].size is returning, in effect, the contentRect size of newVersionWindow.

-Jeremy

===================================
SkoobySoft, home of viJournal
email: email@hidden or visit:
http://freespace.virgin.net/jeremy.dronfield/skoobysoft.html
===================================

On 19 Apr 2004, at 5:19 am, Daniel Todd Currie wrote:

The following code:

NSLog(@"size before: %@", NSStringFromSize([newVersionWindow frame].size));

[NSApp beginSheet:newVersionWindow modalForWindow:windowForSheet modalDelegate:nil didEndSelector:nil contextInfo:nil];

NSLog(@"size after: %@", NSStringFromSize([newVersionWindow frame].size));

Yields the following run log entries:

2004-04-18 21:15:19.421 DTCVM Example[2690] size before: {465, 348}
2004-04-18 21:15:20.362 DTCVM Example[2690] size after: {465, 326}

Any ideas what is causing the window/sheet to be resized? TIAA!

-- Daniel Currie
_______________________________________________
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.
_______________________________________________
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.


References: 
 >sheet weirdness (From: Daniel Todd Currie <email@hidden>)
 >Re: sheet weirdness (From: Jeremy Dronfield <email@hidden>)
 >Re: sheet weirdness (From: Daniel Todd Currie <email@hidden>)

  • Prev by Date: Re: NSWindow display?
  • Next by Date: OT, WO related...
  • Previous by thread: Re: sheet weirdness
  • Next by thread: Newbie question re: NSArrayController
  • Index(es):
    • Date
    • Thread