• 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: programatically resizing a sheet, visually from the bottom up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: programatically resizing a sheet, visually from the bottom up


  • Subject: Re: programatically resizing a sheet, visually from the bottom up
  • From: arri <email@hidden>
  • Date: Fri, 23 Mar 2007 01:42:39 +0100

i tested this in a project i'm working on, and for me this works fine.

maybe that is because the sheet i use is a customized subclass of NSWindow,
and the sheet-instance is created in code, not using any nibs.


NSRect rect = [sheet frame];
rect.size.height += 100;
rect.origin.y -= 100;
[sheet setFrame:rect display:YES animate:YES];

gr
arri

On Mar 23, 2007, at 00:28 00, Brian Amerige wrote:

Hi all,

I have a sheet (NSPanel), which I'd like to programatically resize/ animate --- nothing difficult or out of the ordinarily. Obviously without modification, resizes will occur from (0,0) of the sheet, so it resizes from the top down --- what I'm interested in is decreasing the height of the sheet so that visually it appears that it is getting smaller from the bottom. The context of the situation is much like the context of the Finder's Get Info Window, as the action of its disclosure triangles.


I've been toying with this nearly all day, and I just can't seem to get it! Frustrated, I tossed the code I had written before because it just wasn't working. So I'm starting from the base. Here's what I'd like to do:


	NSRect newFrame = [self frame];
	newFrame.origin.y += 60;
	newFrame.size.height -= 60;
	[self setFrame:newFrame display:YES animate:YES];

This of course chops off the first 60-heightwise pixels of the panel -- in short, any pointers on how to modify the code to remove from the bottom?

Cheers and thanks in advance,
Brian.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

-----
Scanned for virus and spam

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >programatically resizing a sheet, visually from the bottom up (From: Brian Amerige <email@hidden>)

  • Prev by Date: NSViewAnimation choppy animations
  • Next by Date: Re: Compiler has trouble distinguishing between a class and its superclass
  • Previous by thread: programatically resizing a sheet, visually from the bottom up
  • Next by thread: Re: programatically resizing a sheet, visually from the bottom up
  • Index(es):
    • Date
    • Thread