Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy RichTextBox to another RTB

Status
Not open for further replies.

Andrzejek

Programmer
Jan 10, 2006
8,502
US
That should be pretty simple:
I have 2 RichTextBoxes: RTB1 and RTB2

If I have in RTB1:

[tt]This is my text
[li]point one[/li]
[li]second point[/li]
some [blue]colored text[/blue]
[/tt]

and now I want to Copy what I have in RTB1 to RTB2 and keep al the formatting, if I do
[tt]
rtb2.Text = rtb1.Text
[/tt]
I just get the text and loose all the formatting.

How can I do it?

Have fun.

---- Andy
 

Found it:

[tt]rtb2.Rtf = rtb1.Rtf[/tt]

Have fun.

---- Andy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top