hi all,

I am writing some text to rich text box using different fonts for different lines.But i cannot be able to copy the same font to the print prieview page.When i take out the print out, all lines will be of same font.How how can i solve this problem. Can anybody suggest a code for this. I am new to C#.
Thanks in advance

You want "SelectedRTF" not just selected, that would include the formatting

can u please suggest some code for this....
thanks

richbox1.selectedrtf=richbox2.selectedrtf

thank u very much for replying.. but when i use selectedrtf, the output is not coming.. Please suggest correctly since i am new to C#. thank u very much once again..

Well you said you were copying, the text would need to be selected in the example ive given..

Well you said you were copying, the text would need to be selected in the example ive given..

actually what i have to do is i have some text written in rich text box using some fonts for different lines. I have to take the contents of the rich text box print out. Also I can be able to get print out of the contents of rich text box. But the problem i am facing is when i take out the print out, the font will be same for all the lines. But I have to take the print out for the same font which i have stored in the rich text box. So can u please suggest me now how i solve this problem.If u tel me some code it wil be useful for me.

thank u.....

If you need all the rtf code, then use the rtf property it contains the rtf coding as well which would include the fonts/pictures/colors etc.

This article has been dead for over six months. Start a new discussion instead.