• 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
Re: Automatically scrolling to the bottom
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automatically scrolling to the bottom


  • Subject: Re: Automatically scrolling to the bottom
  • From: Andreas Monitzer <email@hidden>
  • Date: Mon, 6 Aug 2001 18:22:15 +0200

On Monday, August 6, 2001, at 05:43 , Christian Mike wrote:

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.

"text" is the NSTextView (*not* the NSScrollView),

NSRange theEnd=NSMakeRange([[text string] length],0); // you should need that for appending, too
[text scrollRangeToVisible:theEnd];

andy
--
"He was addicted to life. But we cured him"


  • Prev by Date: Automatically scrolling to the bottom
  • Next by Date: Re: NSTimer fires ~0.0045 seconds early?
  • Previous by thread: Automatically scrolling to the bottom
  • Next by thread: Re: Automatically scrolling to the bottom
  • Index(es):
    • Date
    • Thread