在RichTextBox中设置光标 [英] Set cursor in RichTextBox
本文介绍了在RichTextBox中设置光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I`ve了简单的形式与它的RichTextBox。在Load事件我写一些文字RichTextBox的,现在我想光标位置设置到该文本的结尾,所以我可以补充一下。我试过对焦(),但它简化版,工作
I`ve got simple form with RichTextBox on it. In Load event I write some text to RichTextBox and now I want to set cursor location to the end of this text so I can add something. I've tried Focus() but it does't work
推荐答案
尝试:
richTextBox1.SelectionStart = richTextBox1.Text.Length;
richTextBox1.Focus();
这篇关于在RichTextBox中设置光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文