Re: Changing document size of scrollview
Re: Changing document size of scrollview
- Subject: Re: Changing document size of scrollview
- From: Graham Cox <email@hidden>
- Date: Wed, 18 May 2011 21:10:17 +1000
On 18/05/2011, at 6:31 PM, Nava Carmon wrote:
> My question is when I change the frame of document view the enclosing scroll view has to adjust itself to the new frame size of document view.
> What I see that scroll view doesn't adjust itself properly. Do I need to call some specific API to change its content size?
Try setting the bounds to match the frame [NSView setBounds:]. It's the bounds that the scroll view is looking at. If the frame and bounds don't agree, you'll get scaling within the view, which is probably not what you want unless you are deliberately implementing zooming of the view.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden