• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

Replacing Lines of a RichTextBox

Hi, does anyone know how to replace an entire line by specifying the line number and the string of a RichTextBox?
Thanx
0
captain_needa
Asked:
captain_needa
1 Solution
 
BlackAndWhiteCommented:
You maynot be able to do that by line numbers.  The line number of a statement in the richtext box is not the same as the real line number.  RichText box does text wraps for you even though there are no carriagereturn line feeds.  However you can replace strings.

1. Instr the string to search on the text of Richtextbox.
2. Select the text with selstart, sellength
3. Insert the new text



0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now