How can I delete a specific line of text in a RichTextBox ?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Generic Generics in Managed C++
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
This also could do the trick (if you can handle things such as ++ in forms code). Keeps the text format. Just remember "ReadOnly" attribute work for both you and user.
Try this:
http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/63647481-743d-4e55-9043-e0db5106a03a/
Find the text to delete in a text range, found here Set the text to empty, and now it is gone form the document.
Based on tomanu's solution but without overhead
note that my linescount here is linescount - 2.
Lots of good answers, but I find many far to complicated.
I hope this helps others some ;0)