Automatically scrolling to the bottom
Automatically scrolling to the bottom
- Subject: Automatically scrolling to the bottom
- From: Christian Mike <email@hidden>
- Date: Mon, 6 Aug 2001 10:43:08 -0500
I have an NSScrollView that functions as a log window. As text enters this
window, I see the vertical scroll bar appear, just as I'd expect, and the
scroll button size shrinks to reflect the proportion of text visible versus
the amount available. This part all works fine. However, I have found that
the NSScrollView does not automatically scroll so that the "latest" stuff at
the bottom of the window is visible. It only displays the oldest stuff at
the top.
How do I programmatically move a scroll view to the bottom? I am always
programmatically placing the insert point cursor at the bottom so that new
stuff comes out appended to the bottom, if that helps any.
Thanks.
Michael Christian
Thomson multimedia Inc.