I use System.Windows.Forms.RichTextBoxand do something like
System.Windows.Forms.RichTextBox
RichTextBox1.Text = "Hello World";
But after this expression, the cursor position in the RichTextBox remains at the beginning. Is there any way to install it to the end?
This should do it for you:
RichTextBox1.Select(RichTextBox1.Text.Length - 1, 0);
Edit: If there is a lot of text in the text field and which it also looks in the frame, add this line:
RichTextBox1.ScrollToCaret();
See msdn for details .
Source: https://habr.com/ru/post/1761902/More articles:Portable vb6 compiler - portabilityCompare the result with hexdigest () with a string - pythonIs there a good reason why extension method classes cannot be nested? - .netОшибка при создании arm-elf-gcc - gccHTML5 and correctness - html5What type of MIME should I use to serve XHTML5 in IE7 and IE8? - mime-typesAdd a new row to the table after each row - jqueryWhy doesn't the MouseEnter event fire? - visibilityJQuery UI draggable: clone if Ctrl is pressed - javascriptWPF: Opacity and MouseEnter Event - c #All Articles