Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Scrolling woes

Scrolling woes
Thread Tools
parallax
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 6, 2002, 09:54 PM
 
I have a scrolling text view, and I want it to scroll down every time something is outputted to it. The problem with moveDown is that often the moveDown method moves it up to the top.

Any suggestions?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
lindberg
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status: Offline
Reply With Quote
Mar 7, 2002, 08:54 PM
 
Probably easy enough to write your own method that calls -scrollRectToVisible:. The one complication is that you'd have to do slightly different things for flipped views (which I believe NSTextView is).
     
parallax  (op)
Admin Emeritus
Join Date: Oct 2000
Location: Boston, MA
Status: Offline
Reply With Quote
Mar 7, 2002, 10:14 PM
 
Originally posted by lindberg:
<STRONG>Probably easy enough to write your own method that calls -scrollRectToVisible:. The one complication is that you'd have to do slightly different things for flipped views (which I believe NSTextView is).</STRONG>
Thanks, I will try that. Is this how terminal does it?
"Against stupidity, the gods themselves contend in vain" (Schiller)
     
Rickster
Mac Elite
Join Date: Feb 2001
Location: Vancouver, WA
Status: Offline
Reply With Quote
Mar 8, 2002, 04:25 AM
 
Yeah, probably, since it's such a wacked-out custom text view.

Normal NSTextViews can just use -scrollRangeToVisible:. If you pass a range which includes the last character, that will scroll all the way to the bottom.
Rick Roe
icons.cx | weblog
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 07:20 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,