A
Anders Sahlin
Hello!
I use a multiline textbox to display application trace information.
I want to have the cursor at the end of the text in the textbox after
adding text to it, otherwise I cant see the latest trace entries.
Here is the code on how I do it today ( which is not efficient):
(Does anyone have a better idea?):
I would be most grateful for any suggestions.
Sincerly Anders Sahlin
mDbgStringBuilder.Append(inputStr);
mDbgStringBuilder.Append("\r\n");
dbgTxtBox.Text = mDbgString.ToString();
//Added these last lines to get textbox to display last entry
dbgTxtBox.Select((dbgTxtBox.Text.Length - 1),1);
dbgTxtBox.ScrollToCaret();
I use a multiline textbox to display application trace information.
I want to have the cursor at the end of the text in the textbox after
adding text to it, otherwise I cant see the latest trace entries.
Here is the code on how I do it today ( which is not efficient):
(Does anyone have a better idea?):
I would be most grateful for any suggestions.
Sincerly Anders Sahlin
mDbgStringBuilder.Append(inputStr);
mDbgStringBuilder.Append("\r\n");
dbgTxtBox.Text = mDbgString.ToString();
//Added these last lines to get textbox to display last entry
dbgTxtBox.Select((dbgTxtBox.Text.Length - 1),1);
dbgTxtBox.ScrollToCaret();