I have a RichTextBox that sometimes contains a large amount of text requiring scrolling to see all of it. Once the text is loaded/entered and a button is clicked the application steps through the text, a character at a time, making changes.
I am trying to scroll the contents of the RichTextBox to keep the row on which the change is currently taking place in the middle of the box.
I can move the caret to the top, and to the bottom, which moves the text down and puts the caret at the top of the box or moves it up and puts the caret at the bottom of the box respectively.
I can place the caret at a given character but depending on where that character is on in the visible section (within the text box) of text is the caret could be , near the top or near the bottom of the box, How do I move the whole of the text so that the line the caret is on, is scrolled to the vertical middle of the box?
Hope all that makes sense.