Prevent smooth scrolling of richtextbox control
Posted on 2003-04-01
Looking for a way to make the richtextbox control scroll a line at a time. I have a custom control that implements line numbers by pairing a picture box and the richtextbox as constituent controls. A timer checks the current line (via SendMessage) of the richtextbox and prints a range of line numbers to the picturebox.
The problem is that the user sees the smooth scrolling of the richtextbox, while the picturebox with the line numbers appears to jump to the next line. So I need to either disable the smooth scrolling of the richtextbox or figure out how to make the printing of line numbers work on pixel boundaries. I'm not opposed to subclassing if that's the only way to do it.