Text box, Scroll to caret

kejpa

Junior Contributor
Joined
Oct 10, 2003
Messages
320
Hi,
I have a textbox that shows the trace output of my app.
After the text is updated I always see the first line. I'd really like it in another way.
If the caret is at the last position of the textbox I want to see the end of the text box.
If it's in another position I'd like to keep it there and have that row visible.

I can't find any methods for scrolling the textbox to the caret position, help please!

/Kejpa
 
:o
It was that simple. I ought to be ashamed of myself for not figuring it out....

Thanks anyway!

/Kejpa, somewhat embarrased
 
The thing about the textbox is that when the text is changed the caret doesnt move to the end. There is no caret. The SelectionStart property is set to -1, signifying that the caret isnt anywhere i suppose. So you need to move the caret to the location that you want to be visible.
 
Back
Top