I have a RichBox (memo) in which I would like to add lines.
I am currently using this
RichBox1.text += "the line I'd like to add" + "\n";
Isn't there something like a method in Delphi below?
Memo.Lines.add('The line I''d like to add');
AppendText is the closest to it. Unfortunately, you still need to add a newline:
RichBox1.AppendText( "the line I'd like to add" + Environment.NewLine );
You can use the extension method to add this convenient method addto the RichTextBox class. http://msdn.microsoft.com/en-us/library/bb383977.aspx
add
public static class Extension { public static void add(this System.Windows.Forms.RichTextBox richText, string line) { richText.Text += line + '\n'; } }
You can use the AppendText method from TextBoxBase and explicitly add a new line
RichBox1.AppendText("the line i'd like to add" + Environment.NewLine);
Source: https://habr.com/ru/post/1706589/More articles:When should all thread synchronization objects be used? - multithreadingUnable to edit tags in CListCtrl - c ++How to encrypt data after using ajax and jquery? - jqueryCannot start JUnit test case containing streams from Eclipse - eclipseAre there any other open source JCE libraries besides BouncyCastle? - javaDBLinq does not generate where clause - linq-to-sqlWhy won't the Nullable Public Property in the VB.net class accept 0 (zero) as the destination? - vb.nethttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1706592/silverlight-access-to-file-path&usg=ALkJrhiW4ZntCHeJgzHU46nPl4lWyddT8QnSql data output during unit tests - loggingКакое правильное решение для службы авторизации с высокой доступностью? - performanceAll Articles