Re: Resizing Windows
Re: Resizing Windows
- Subject: Re: Resizing Windows
- From: "Kyle Wheeler" <email@hidden>
- Date: Tue, 14 May 2002 23:15:29 -0400 (EDT)
Peter Thorson said:
>
I need to programaticly resize a window. I would like to do this from
>
teh top left corner not the bottom left.
The way I've always done that is by figuring out the new size of the
window, then finding the difference between the old height and the new
height and moving the window that many pixels in that direction (doing the
same with horizontal pixels). Then setting the frame is one command (that
does both) - something like [myWindow setFrame:newframe animate:TRUE];
which makes the window *appear* to the user to be resizing around the top
left corner.
The key is changing the position of the window at the same time as you
change the size of the window (which can be done in one command). It's
kinda odd to think about at first, but once you get it done, put it in a
wrapper-function and forget about it.
~Kyle
_______________________________________________
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.