I have 2 identical richtextboxes (rtb1 And rtb2).They both have vertical scroll bars. I want to make rtb2 scroll to where rtb1 is scrolled to. Say rtb is scrolled to line 123. I want rtb2 to scrol to line 123. Get the picture?
Printable View
I have 2 identical richtextboxes (rtb1 And rtb2).They both have vertical scroll bars. I want to make rtb2 scroll to where rtb1 is scrolled to. Say rtb is scrolled to line 123. I want rtb2 to scrol to line 123. Get the picture?
What is your ultimate purpose?
Use the SendMessage API to send the EM_LINESCROLL message to the RichTextBox you want to scroll. (I don't know the number value of EM_LINESCROLL...if you have a flavor of C++ on your machine, it's in "winuser.h")
SendMessage RichTextBox2.hWnd,EM_LINESCROLL,[number of columns to scroll horizontally],[number of lines to scroll vertically]