Scroll behavior at TextView bottom?
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