Automatic scrolling in an NSTextView
Automatic scrolling in an NSTextView
- Subject: Automatic scrolling in an NSTextView
- From: Mike Brinkman <email@hidden>
- Date: Sun, 13 Oct 2002 23:57:56 -0400
I've got an NSMutableString which I append and then set as the string
in an NSTextView as such:
[myText setString:myString];
It works like a charm, except that I have to scroll to see the appended
text. Is there a way to have the NSTextView scroll automatically to the
most recently appended text?
I tried [myText setNeedsDisplay:YES]; but that didn't do anything.
I have looked through the developer docs at NSTextView, NSText,
NSView, NSResponder and NSScrollView, but haven't found anything that
does what I'd like it to do. There are some "autoscroll" methods, but
that seems to deal with if the NSTextView should scroll or not if
somebody selects text in the NSTextView with the mouse and drags.
My app is a non-document based Cocoa app, and the NSTextView is neither
Editable or Selectable.
Most likely I have overlooked or misunderstood something in the
documentation, so I would really appreciate it if somebody could help
me.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.