Synchronize scrolling in two richtextboxes

  • Thread starter Thread starter VStennis
  • Start date Start date
V

VStennis

Hi,
I am trying to synchronize scrolling in two richtextboxes, when I
scroll one, the second one should scroll exactly with it.
Does anyone have any ideas how to approach this in C#?
 
Hello VStennis,

The HScroll and VScroll events from RTB may help. As soon as HScroll is fired, you'll need to start keeping track of mouse (x-coordinates). I am thinking you would have to raise events (i.e. XCoordChanged) from one RTB, so the other one can handle the events and scroll respectively. You'll also need to keep track of which RTB is the master, the one the user is actually scrolling on. It doesn't seem this problem has a simple solution, I was just suggesting some ideas off the top of my head.

Best of luck!

Your C# ally ,
RBischoff


V> Hi,
V> I am trying to synchronize scrolling in two richtextboxes, when I
V> scroll one, the second one should scroll exactly with it.
V> Does anyone have any ideas how to approach this in C#?
 
Back
Top