Re: auto scrolling my text view
Re: auto scrolling my text view
- Subject: Re: auto scrolling my text view
- From: Satoshi Matsumoto <email@hidden>
- Date: Tue, 02 Mar 2004 12:50:02 +0900
on 04.3.2 0:30 PM, Paul FitzGerald at email@hidden wrote:
>
I have a NSTextView sitting happily in a NSScrollView. I'm programmatically
>
displaying text in the text view and highlighting sections of the text
>
programmatically. What I need to happen is when I change the selected text
>
the selected text to scroll into view. I was hoping for an API call like
>
scrollSelectionIntoView but ... no.
>
What is the best approach to making this happen?
The following method is maybe what you want...
- (void)scrollRangeToVisible:(NSRange)aRange
Scrolls the receiver in its enclosing scroll view so the first characters
of aRange are visible.
Satoshi,
-----------------------------------------------------
Satoshi Matsumoto <email@hidden>
816-5 Odake, Odawara, Kanagawa, Japan 256-0802
_______________________________________________
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.