• 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: Behavior of NSTextView scrollRangeToVisible
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: Behavior of NSTextView scrollRangeToVisible
      • From: Satoshi Matsumoto <email@hidden>
References: 
 >Behavior of NSTextView scrollRangeToVisible (From: Satoshi Matsumoto <email@hidden>)

  • Prev by Date: Multicast addresses
  • Next by Date: Re: CFShow in Cocoa
  • Previous by thread: Behavior of NSTextView scrollRangeToVisible
  • Next by thread: Re: Behavior of NSTextView scrollRangeToVisible
  • Index(es):
    • Date
    • Thread