Q:

Vertical scroll Scintilla Textbox during Text Changed event

Setting a Scintilla.Net textbox with a string and scrolling to last line doesn't work. 
This Q & A How make autoscroll in Scintilla? has the answer but it wont work at the same time as setting the text. 
Bare bones repro:
private void button1_Click(object sender, EventArgs e)
{
    string s = RandomString(400);
    scintilla1.Text = s + " " + s + " " + s + " " + s + " " + s;
    scintilla1.Scrolling.ScrollBy(0, 10000);    //<-doesn't work (but does work eg in a Button2_click)
}

private static Random random = new Random((int)DateTime.Now.Ticks);
private string RandomString(int size)
{
    StringBuilder builder = new StringBuilder();
    char ch;
    for (int i = 0; i < size; i++)
    {
        ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
        builder.Append(ch);
    }
    return builder.ToString();
}

Does anyone know how to scroll vertically down to end line after setting the text?

A:

Well you can try to put Refresh() after adding the text;

scintilla1.Text = s + " " + s + " " + s + " " + s + " " + s;  
  scintilla1.Refresh();

for this case i found out that you will need to Refresh() twice depend on the length of the string you put on the textbox.

