Edit Line in RTB

Tezzies

Member
Joined
Mar 4, 2010
Messages
7
Programming Experience
Beginner
Hi all,

I ve only been playing with vb for a week so apologies in advance. I am sure you can help but after extensive searching I cant find a solution.
I have RTB witch I can edit with text by using .
RichTextBox1.text = RichTextBox1.text & "stuff" & VbcrLf

Great but I loose any editing to colour/font I may of done previously. Is there a way of just adding a new line. I am thinking along the lines of finding the last character then adding my new line.

Many thanks in advance
 
Can I be so bold as to ask one more question.

The text I have appeneded (using Johns helpful code) is the last line of the text box, I now wish to change its colour using code. I have been using the "Find" technique which is great until you append some text which is the same as an earlier line. Sooooo.....Is there a way a grabbing and editing the last lin????

I ve looked through---- RichTextBox Members (System.Windows.Forms) and cant find anything that I can use.

Many thanks in advance
 
Back
Top