• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Automatic scrolling in an NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Automatic scrolling in an NSTextView
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Custom NSWindow Subclass
  • Next by Date: Re: Automatic scrolling in an NSTextView
  • Previous by thread: Re: Custom NSWindow Subclass
  • Next by thread: Re: Automatic scrolling in an NSTextView
  • Index(es):
    • Date
    • Thread