Hey guys - thanks.

OK, I was setting bounds rather than frame.  Oops.
Now I don't have the weird zoom effect of the content growing to fit the clip view, but I do have the content marching down relative to the clip view as I switch back and forth between small and large content. I think this is expected behaviour though as I see that you have to take care to preserve the frame position in these circumstances. So, looks like it's just more experimentation and accustomisation that I need now :-)


On 9-Feb-09, at 8:05 PM, Andy Lee wrote:

On Feb 9, 2009, at 9:26 PM, Eric Gorr wrote:
On Feb 9, 2009, at 9:07 PM, Luke Evans wrote:

My experiments suggest that simply setting the current document view in an NSScrollView to a new size results in the unexpected behaviour (to me) of having all the content of the document view be scaled up or down to fit the size of the NSClipView.

I am not certain exactly what you are doing, but I have been able to successfully do this.

Works for me too. I hooked up a button to do the following and it works just fine.

    NSView *docView = [_scrollView documentView];
    NSSize oldFrameSize = [docView frame].size;
[docView setFrameSize:NSMakeSize(oldFrameSize.width + 10.0, oldFrameSize.height + 10.0)];

Are you sure you're not accidentally doing something with the clip view?

--Andy


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please 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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to