NSScrollView, centering document view?
NSScrollView, centering document view?
- Subject: NSScrollView, centering document view?
- From: Todd Heberlein <email@hidden>
- Date: Sat, 29 Jan 2011 21:38:15 -0800
When working with an NSScrollView, sometimes my document view is smaller than my content/clip view. (the document view's size is dynamically generated depending on the data that needs to be rendered; or the user may make the window much larger than the document view.) In these cases I would like to have my document view centered inside the clip view (as opposed to being anchored in the lower-left corner as it currently is. I tried changing the document view's frame's origin, but this didn't appear to have any effect.
Is there an easy way to do this? Or should I make sure my document view is always at least as large as the content view and then just center my drawing inside my document view?
Thanks,
Todd
_______________________________________________
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