bump text up in a textbox
<p>If I had a TextBox that is 32 lines high.
How could I "Bump" the current text in the TextBox down 1 then prepend the new text on the first line.</p>

<p>This is what I tried it doesn't work and is obviously not a clean/efficient way of doing something</p>

<pre><code>String[] chat = new String[32];

if (client.Controls[0].InvokeRequired)
{
    SetTextCallback d = new SetTextCallback(setText);
    client.Invoke(d, new object[] { text });
}
else
{
    chat[0] = chat[1].ToString();
    chat[1] = chat[2].ToString();
    chat[2] = chat[3].ToString();
    chat[3] = chat[4].ToString();
    chat[4] = chat[5].ToString();
    chat[5] = chat[6].ToString();
    chat[6] = chat[7].ToString();
    chat[7] = chat[8].ToString();
    chat[8] = chat[9].ToString();
    chat[9] = chat[10].ToString();
    chat[10] = chat[11].ToString();
    chat[11] = chat[12].ToString();
    chat[12] = chat[13].ToString();
    chat[13] = chat[14].ToString();
    chat[14] = chat[15].ToString();
    chat[15] = chat[16].ToString();
    chat[16] = chat[17].ToString();
    chat[17] = chat[18].ToString();
    chat[18] = chat[19].ToString();
    chat[19] = chat[20].ToString();
    chat[20] = chat[21].ToString();
    chat[21] = chat[22].ToString();
    chat[22] = chat[23].ToString();
    chat[23] = chat[24].ToString();
    chat[24] = chat[25].ToString();
    chat[25] = chat[26].ToString();
    chat[26] = chat[27].ToString();
    chat[27] = chat[28].ToString();
    chat[28] = chat[29].ToString();
    chat[29] = chat[30].ToString();
    chat[30] = chat[31].ToString();
    chat[31] = text + "\r\n";
    for (int i = 0; i &lt; chat.Length; i++)
    {
        if (chat[i] != null)
        {
            client.Controls[0].Text += text + "\r\n";
        }
    }
}
</code></pre>
