Re: Using -scrollRectToVisible: in NSTextView
Re: Using -scrollRectToVisible: in NSTextView
- Subject: Re: Using -scrollRectToVisible: in NSTextView
- From: J Nozzi <email@hidden>
- Date: Tue, 6 Jul 2004 12:28:53 -0400
I agree ... this is what I do. Look at NSRangeFromString() and
NSStringFromRange() for storing in preferences or an easy way of
storing in meta data ... the neat thing here is that by storing the
selected range, you can not only 'remember' the position, but the
selection as well.
- J
On Jul 6, 2004, at 12:19 PM, Douglas Davidson wrote:
On Jul 6, 2004, at 8:12 AM, Jeremy Dronfield wrote:
Are there any known issues with sending -scrollRectToVisible to
NSTextView (or subclasses)?
I'm trying to get my text view to remember the visible rect for the
last text file viewed, so that it can scroll back to that place when
the same file is next loaded. I'm doing this:
I think you would probably be better off using scrollRangeToVisible:
instead; otherwise you might need to manually force layout before
scrolling.
Douglas Davidson
_______________________________________________
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.
_______________________________________________
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.