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

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?
0
dev-us
Asked:
dev-us
  • 2
1 Solution
 
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
0
 
dev-usAuthor Commented:
Idle Mind, you are such a life saver...

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

    "I'm a Stay@Home Dad with two kids..."
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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