Re: keeping a view at a given aspect ratio?
Re: keeping a view at a given aspect ratio?
- Subject: Re: keeping a view at a given aspect ratio?
- From: Cameron Hayne <email@hidden>
- Date: Sun, 2 Jun 2002 13:14:06 -0400
Michael B. Johnson <email@hidden> wrote:
So I've got an NSMovieView and I want to make sure that it never gets
resized at a different aspect ratio than the movie that it's showing.
What's the best way to accomplish this? I'm thinking of both the
obvious this-is-the-only-view-in-a-resizable-window case as well as one
where the view is one of many on a panel.
I can think of doing things with delegates and constraining the
window's size in the first case, but the second one isn't obvious (at
least to me) as to how to proceed.
You could try subclassing NSMovieView and then overriding -setFrameSize
to enforce whatever size constraints you want. You might have to do
something special with the superview to make sure it fills in the gaps
around the NSMovieView after this.
... Cameron
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
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.