Is there a way to programmatically set the insert point in a multiline richTextbox?

Example: I have a (almost) free format message where the reciever is expected to enter his own information at certain points (marked with a special char-sequence), before the message is processed further. A richTextbox.Find will find the spot in the message where the text is supposed to be entered, but I have not yet found a way to move the cursor to that particular position.

Recommended Answers

All 3 Replies

Try richTextBox1.Select(charPos, 0); to move the cursor to after the charPos'th character.

Thank you, works fine now!

If your problem is resolved please mark the thread solved.:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.