I am writing text to a multi-line text box using data from the serial port. Currently it writes each new line below the previous line, so eventually the newest lines of text are off the screen, and user must scroll down to view them. How can I change the code so it writes each new line above rather than below the previous line of text? I'm developing the program for Windows Mobile 6 devices using C# in VS2008. I know this is probably a simple solution, but I'm new to C# and can't seem to figure out what I'm doing. Thanks in advance!
Update:
This is the closest to what I was trying to accomplish:
private void terminalText(object o, EventArgs e)
{
tbTerminal.Text += rawString;
tbTerminal.Select(tbTerminal.TextLength, 0);
tbTerminal.ScrollToCaret();
}
It doesn't write the next line above the previous line as I was hoping, but it automatically focuses the latest written text so you don't have to use the scroll bar to view the most recent port data. I appreciate all the help!