Re: Behavior of NSTextView scrollRangeToVisible
Re: Behavior of NSTextView scrollRangeToVisible
- Subject: Re: Behavior of NSTextView scrollRangeToVisible
- From: "Louis C. Sacha" <email@hidden>
- Date: Wed, 12 May 2004 02:24:27 -0700
Hello...
Well, the complete source code for TextEdit is probably already on
your hard drive at:
/Developer/Examples/AppKit/TextEdit/
You might be able to find the answers to your questions by looking at
exactly what TextEdit is doing.
Louis
I have a question about the behavior of NSTextView scrollRangeToVisible.
In TextEdit, NSTextView scrollRangeToVisible shows 3 different behaviors.
1. In the Wrap to Page mode, when current scroll position is less than
target position that is going to be scrolled, the result target position
appears at the bottom of the window.
2. In the Wrap to Page mode, when current scroll position is greater than
target position, the result target position appears at the top of the
window.
3. But in the Wrap to Window mode, the result target position always appears
at the center of the window.
You can reproduce above 3 behaviors by executing the Menu Edit>Find>Jump to
Selection (cmd+J).
Why the behaviors of scrollRangeToVisible are different between Wrap to Page
mode and Wrap to Window mode? And How to control these behavior of
scrollRangeToVisible programmatically.
-----------------------------------------------------
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.