How does one prevent the richedit control from partially displaying the first visible line of text, aka. Firefly, PFE, and SED? I have a buddy text control that displays corresponding line numbers for the text in the richedit control. In order to snychronize the line numbers with the richedit text I am using the EM_GETFIRSTVISIBLE message which works ok, but when the text in the richedit control for the first visible line is partially scrolled up or down things don't line up too well between the two controls. This effect only occurs when the user drags the vertical scroll thumb all other keyboard navigation keys and mouse options work great.
TIA
hmmm... yeah, I see what you mean. I tried a few things but I couldn't prevent the text from displaying partial lines. The other editors that you list do not use a RichEdit (FireFly and JPro use CodeMax, SED uses Scintilla). Those editing components use fixed width and height fonts so they can easily scroll one full line at a time. On the other hand, the RichEdit control can have variable height fonts so scrolling a full line is not easy.
Maybe someone else around here has dealt with this, hopefully.
Thanks.
I guess I forgot to mention that I'm using a non proportional font too, so it would seem like this should not be much of a problem, but... The other thing I thought of is to maintain a list of the line numbers in its entirety in another textbox control and syncing them up from the vertical scroll thumb from the richedit control, but I really didn't want to go to that much trouble. Right now I'm only generating the line numbers for the visible lines in the richedit control.