Reputation: 1011
I have a RichTextBox in my C#-application. Both horizontal and vertical scrolling are enabled.
Current behavior: When I reach the last line of visible text area, horisontal scrolling comes to place. But scrolling is being made by pixels, not by line. So I can't see the text I'm typing becase the line itself is partly (or completely) invisible until I do vertical scrolling with arrow button or dragging vertical scrollbar.
Expected behavior: I would like to have RichTextBox scrolling similar to scrolling in Notepad. In Notepad, I always see the line I'm typing in. It is really smooth line-based scrolling.
Any idea? Some implicit settings in RichTextBox? Anything else? Thanks,
Upvotes: 1
Views: 2509
Reputation: 1423
Adding event handler to the TextChanged event, and programmatically scrolling down Check out : this post at bytes.com
Upvotes: 1