programatically resizing a sheet, visually from the bottom up
programatically resizing a sheet, visually from the bottom up
- Subject: programatically resizing a sheet, visually from the bottom up
- From: Brian Amerige <email@hidden>
- Date: Thu, 22 Mar 2007 19:28:00 -0400
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