Rich Text

Hello, I have three rich text boxes...

I have content in the first two text boxes that are formated with fonts, colors, etc...  

I want to copy the components from those two rich text boxes to the third one but still maintain the formatting...

How can i do this?
Who is Participating?
Mike TomlinsonMiddle School Assistant TeacherCommented:
Make your selection using SelectionStart() and SelectionLength().  Then use SelectedRtf to grab the formatted selection:

        ' select something in RichTextBox1
        RichTextBox1.SelectionStart = 10
        RichTextBox1.SelectionLength = 25

        ' append to RichTextBox3
        RichTextBox3.SelectionStart = RichTextBox3.TextLength
        RichTextBox3.SelectionLength = 0
        RichTextBox3.SelectedRtf = RichTextBox1.SelectedRtf
dev-usAuthor Commented:
Idle Mind, you are such a life saver...

What do you do for a living?
Mike TomlinsonMiddle School Assistant TeacherCommented:
Read my profile...   =)

    "I'm a Stay@Home Dad with two kids..."
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.