Animated window resizing

How would I go about animating a window resizing on OS X. I have a window that changes dimensions as the user selects different buttons on the toolbar (a common UI behaviour on OS X). Currently, the window resizes sharply to the new width and height but I’m looking for a way to make it a smooth animated transition.

How should I approach this?

Thanks,

MadDoc

I suggest looking at the Animation Kit @ http://thezaz.com/code/animationkit/

While I have not dome it, if I understand correctly, this might work:

Use a time to increase the size of the window in steps (last enough to be smooth but not too fast ) , enable live resizing on the window and use a combination of position locks and code in the Window resizing event to position the controls.

You know the staring and final dimensions. Choose how long you want it to take to resize, and go for about 24 resizes/sec (a guess- more if it look choppy- use as low as you can get away with visually) .

Use those values to calculate, the timer period , # of steps and how much to resize on each step.

I don’t think it would-be hard.

MBS has a pair of functions -

window1.SmoothResizeMBS(w,h) window1.SmoothResizeCenteredMBS(w,h)

That looks like just what I was after. Thanks.