Reputation: 6480
So I'm using this code which moves the cursor to the end of the text box content each time I'm adding something to it.
void txtDisplay_TextChanged(object sender, EventArgs e)
{
txtDisplay.SelectionStart = txtDisplay.Text.Length;
txtDisplay.ScrollToCaret();
txtDisplay.Refresh();
}
The problem is that I see like flickering of text box scroll bar which goes up and down each time I add something to the text box. Doing this 10 times a second seems like it consumes some processing power and it looks ugly.
How to keep the scroll bar scrolled down all the time?
Upvotes: 1
Views: 1128