• 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
Scroll behavior at TextView bottom?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scroll behavior at TextView bottom?


  • Subject: Scroll behavior at TextView bottom?
  • From: vze26m98 <email@hidden>
  • Date: Tue, 19 Jul 2005 09:08:07 -0400

Hi all-

I've implemented a scrolling console window and am using some code
borrowed from Apple to write to my TextView:

>  endRange.location = [[console textStorage] length];
>  endRange.length = 0;
>  [console replaceCharactersInRange: endRange withString: aNSString];
>  endRange.length = [aNSString length];
>  [console scrollRangeToVisible: endRange];

This works fine, but given what I'm writing to the TextView always ends
in a newline ("\n"), when I get to the bottom of the view, my cursor is
one line below it and not visible.

Typing, of course, jumps it up and if I append visible characters to the
newline (eg "\nfoo") and not spaces, the scrolling seems to do as I
would want.

Am I doing something wrong here? Any suggestions on getting my cursor to
show itself at the bottom of the screen?

Best and thanks,

Charles Turner

<email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSFileManager - "Can't read directory contents" ??
  • Next by Date: Re: UTIs and writeToFile:atomically:
  • Previous by thread: Re: CoreData and 2GB+ files
  • Next by thread: Re: Display Rich Text Encoding within plain text
  • Index(es):
    • Date
    • Thread