Trouble with initial position of NSScrollView
Trouble with initial position of NSScrollView
- Subject: Trouble with initial position of NSScrollView
- From: Oftenwrong Soong <email@hidden>
- Date: Mon, 9 Nov 2009 12:10:07 -0800 (PST)
Hi all,
My app's UI was swapping views into a NSBox (a la Hillegass's book). Now I decided to replace the NSBox with a NSScrollView. No big difference there. I only made three changes: In IB, I got rid of the NSBox and dropped a NSScrollView in its place. In my document controller class, I modified the IBOutlet, which I call everChangingView, to point to a NSScrollView instead of a NSBox. Finally, in the method that swaps the view, I call [everChangingView setDocumentView:v] instead of [everChangingView setContentView:v].
The views do swap into the NSScrollView as they should.
Unfortunately each time I swap a view, the vertical scrollbar goes all the way to the bottom, meaning that I have to manually scroll back up to bring the view into view.
What did I do wrong?
Thanks,
Soong
_______________________________________________
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