Hi Mojo,
Thanks for posting in the community. My name is Peter, and I will be
assisting you on this issue.
First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to add or remove part of
the RTF-Text in a RichTextBox.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
I agree with Herfried's suggestion.
For RTF-Text you may try the SelectedRtf as below.
Dim o As New RichTextBox
o.Rtf = "{\rtf1\ansi This is in \b bold\b0.}"
Me.Controls.Add(o)
'The line will insert the rtf where the curser is.
o.SelectedRtf = "{\rtf1\ansi This is in \b bold\b0.}"
'This will remove part of the RTF-Text.
o.Select(5,7)
o.SelectedRtf = ""
For detailed information, you may take a look at the demo below.
Insert Plain Text and Images into RichTextBox at Runtime
http://www.codeproject.com/cs/miscctrl/CsExRichTextBox.asp
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.