Re: smooth resize
Re: smooth resize
- Subject: Re: smooth resize
- From: Oliver Cameron <email@hidden>
- Date: Sat, 12 Jun 2004 20:40:20 +0100
Something like this would work:
- (void)resizeTheWindow:(id)sender;
{
NSRect windowFrame;
NSRect newWindowFrame;
windowFrame = [myWindow frame];
newWindowFrame = NSMakeRect(NSMinX(windowFrame), NSMaxY(windowFrame) -
titleToolbarHeight, NSWidth([myView frame]), titleToolbarHeight);
[myWindow setFrame:newWindowFrame display:YES animate:YES];
}
You should look up NSMakeRect to see the values you should use. For
example, I'm resizing to myView's size, you could use a hard-coded
value.
Hope this helps,
Oliver
On 12 Jun 2004, at 19:35, Rhon Fitzwater wrote:
Okay, so I got the smooth animation working thanks to Daniel Waylonis.
But now I know how to do the smooth resize. I have some code that I
used in one of my AS Studio programs:
- (void)setFrame:(NSRect)frameRect display:(BOOL)displayFlag
animate:(BOOL)animateFlag;
Using call method:
call method "setFrame:display:animate:" of object window of theObject
with parameters {{259, 256, 300, 400}, true, true}
How would I convert this into just cocoa code for my cocoa program?
Thanks,
-Rhon
[demime 0.98b removed an attachment of type
application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.