如何将光标设置为richtextbox中的特殊位置

如何将光标设置为richtextbox中的特殊位置

问题描述:

我有richtextbox,我想将光标移到richtextbox中的特殊位置.
怎么办?

例如我的rtb长度为20
我想将光标移到位置15

tnx

i have richtextbox and i want to move the cursor to special position in richtextbox
how do this??

for example my lenght of my rtb is 20
and i want to move cursor to position 15

tnx

设置RichTextBox.SelectionStart属性-输入指针(或插入符")将紧随其后:
Set the RichTextBox.SelectionStart property - the input pointer (or "caret") will follow it:
myRichTextBox.SelectionStart = characterNumberIWantTheCaretAt;