On Thu, Jun 7, 2012 at 5:47 AM, koko <[email protected]> wrote:

> On an NSTextView I call -selectAll: and then -insertText:
>
> This scrolls the view to the end of the text.
>
> How would I scroll the view to the top of the text?
>

Just before the insertText: get the current scroll position and then
restore it:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/Scrolling.html
"Determining the Current Scroll Location"
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to