У меня для текстового поля Winforms установлено AcceptReturns = true, полосы прокрутки = вертикальные, Multiline = true. Я создаю строку с именем note, зацикливая данные, помещая значение в примечание с помощью: note = note плюс "\ n \ n". Когда я просматриваю строку с помощью визуализатора текста, он правильно показывает CR \ LF, но после команды: remarks.text = note текстовое поле НЕ имеет CR \ LF. Как получить уважение к CR \ LF?
int x = 0;
string note = "";
command = null;
DataTable dtnew = new DataTable();
foreach (string rcd in app.feecd) // app.feecd is an array established earlier in code
{
command = GetConnectedClass.newsqlconnection("SELECT NoteDesc from dbo.inspnote where NoteCode = @selcode");
command.Parameters.AddWithValue("@selcode", rcd);
dtnew.Load(command.ExecuteReader());
note = note + dtnew.Rows[x].Field<string>("NoteDesc") + "\n\n";
command = null;
x = x + 1;
}
if (remarks.Text == "")
{ remarks.Text = note; } // note has CR\LF but remarks.Text NO CR\LF ????
else { remarks.Text = remarks.Text + "\n\n" + note; }