To append new line with auto scroll down use this code:
string t = "new text to append";
yourTextBox.SelectionStart = yourTextBox.Text.Length;
yourTextBox.SelectionLength = 0;
// yourTextBox.SelectedText
SendMessage(yourTextBoxHWND, EM_REPLACESEL, false, t);
For the reason explanation why you should use SendMessage instead of
SelectedText see Alex Feinman's post:
http://blog.opennetcf.org/afeinman/P...07210ab40.aspx
--
Sergey Bogdanov
http://www.sergeybogdanov.com
Peyton Collins wrote:
> My CF application in CE4.2 has a textbox which shows which steps a robot is
> executing:
>
> Move 1
> Move 2
> .
> .
> Move 98
> Move 99
> etc.
>
> The way it is now, the display shows only Move 1, Move 2, etc. at the top of
> the screen, and you have to scroll down to the bottom to see what the robot
> is currently doing. I would like to display the last lines in the textbox
> string (in this case Move 98, Move 99) at the bottom of the textbox without
> having to scroll manually down to the bottom of the textbox every time the
> textbox string is changed.
>
> Is this possible?
>
>