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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RichTextBox problem

Status
Not open for further replies.

snProgrammer

Programmer
Joined
Mar 21, 2005
Messages
3
Location
FR
I have two RichTextBoxes in a windows form. The first, rtbSource, is loaded from an rtf file. I want to be able to select text from rtbSource and copy it into rtbDestination with all the formatting intact. I do the following:
rtbDestination.Rtf = rtbSource.SelectedRtf

The problem is that sometimes rtbDestination doesn't display the formatting correctly. I know this is the problem because I saved the selected rtf from rtbSource into a file and it looks correct.

The other thing I have noticed, is that I only get this problem when my selection doesn't include the end of the paragraph.

Any ideas?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top