NSScrollView "autoscroll" while adding data?
NSScrollView "autoscroll" while adding data?
- Subject: NSScrollView "autoscroll" while adding data?
- From: Jack Repenning <email@hidden>
- Date: Sun, 20 Apr 2008 17:38:12 -0700
I have an NSScrollView to which I add data as the program proceeds. I
would like to have it scroll itself automatically, so that the bottom
(most recently added) line is always visible, instead of the top. As
an example, Xcode's build transcript does what I'm after. I figured
this would be called "autoscroll," and searched web, list, and dox for
that, but it looks like "autoscroll" specifically refers to what
happens while the user is dragging the scroll thumb about -- not what
I meant. I can't find any reference to autoscroll-during-add.
I confess what I actually want is a bit more complicated than always
positioning at the bottom: if the user has moved the thumb about, then
the user's chosen position should win; it's only if the thumb is
bottomed at the moment I add the next line that I would "autoscroll."
I suspect some further subtleties lurk in the neighborhood of the
transition out of "not enough data even to fill one screen full."
This seems familiar enough, and subtle enough, that surely it must be
hiding in the library somewhere? I don't have to reinvent this wheel,
do I? Because I went lookin' for the pieces to do that, and came up
dry there as well!
-==-
Jack Repenning
email@hidden
Project Owner
SCPlugin
http://scplugin.tigris.org
"Subversion for the rest of OS X"
_______________________________________________
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