Scroll synchronization of two RichTextBox controls
-
In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.
-
In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.
You can build a user control (or custom control), and handle the scroll event in another RichTextBox.
April Comm100 - Leading Live Chat Software Provider
-
In a forms-based application, I would like to synchronize two RichTextBox controls so that one without a vertical scroll bar will scroll in synch with the other one (which has a vertical scroll bar). I.e., I want to be able to scroll both controls with one scroll bar. Thanks for any suggestions, Tom P.S. I saw Karin Huber's article, but this is for WPF and Silverlight.
"Scrolling Around with the RichTextBox Control" discusses how to do that in VB, and there is a C# translation in a message at the bottom of the article.