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.

If you construct new views that are the appropriate size and then do [myScrollView setDocumentView:newView], then everything is peachy: the scroll view adapts to the size of the new new document view. If you keep the document view, but change its content and resize it accordingly, you get the weird scaling/zooming effect.

Presumably, one is _supposed_ to create a new document view and set it into the NSScrollView when you want to change the content like this, but I'm curious if one is simply "not allowed" to have the document view change size, or if there's some magic plumbing that makes this work (the documentation seems silent on the subject).

-- lwe _______________________________________________

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