RichTextBox only scrolls after recieving focus?
Hi, I was wondering if anyone else noticed this, and hopefully if someone has a solution.
If you want to scroll an rtf box, I have found it will not budge unless you give it focus:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RichTextBox1.AppendText(" MOO " & vbCrLf)
RichTextBox1.Focus()
Button1.Focus()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
RichTextBox1.Text &= " MOO " & vbCrLf
RichTextBox1.SelectionStart = RichTextBox1.TextLength
RichTextBox1.ScrollToCaret()
RichTextBox1.Focus()
Button1.Focus()
End Sub
To me it sounds like a framework bug, as I cannot see a single reason why anyone would want it like this. Ive tried a few API calls but not a single one seems to be doing anything.
Thanks in advance for your help.