RichTextBox C# Set caret location winforms

后端 未结 4 354
情书的邮戳
情书的邮戳 2021-01-22 15:38

I am building a chat application where the user enters its text to a richtextbox.

In the rich text box there is an initial text which says: \"Me: \".

Now, when

4条回答
  •  别那么骄傲
    2021-01-22 15:58

    Use the Select method:

    public void Select(
        int start,
        int length
    )
    
    richTextBoxUserText.Select(richTextBoxUserText.TextLength, 0);
    

提交回复
热议问题