copying the contents of richtext box with same font

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2008
Posts: 27
Reputation: sancti is an unknown quantity at this point 
Solved Threads: 0
sancti sancti is offline Offline
Light Poster

copying the contents of richtext box with same font

 
0
  #1
Sep 1st, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: copying the contents of richtext box with same font

 
0
  #2
Sep 1st, 2008
You want "SelectedRTF" not just selected, that would include the formatting
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 27
Reputation: sancti is an unknown quantity at this point 
Solved Threads: 0
sancti sancti is offline Offline
Light Poster

Re: copying the contents of richtext box with same font

 
0
  #3
Sep 1st, 2008
Originally Posted by LizR View Post
You want "SelectedRTF" not just selected, that would include the formatting
can u please suggest some code for this....
thanks
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: copying the contents of richtext box with same font

 
0
  #4
Sep 1st, 2008
richbox1.selectedrtf=richbox2.selectedrtf
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 27
Reputation: sancti is an unknown quantity at this point 
Solved Threads: 0
sancti sancti is offline Offline
Light Poster

Re: copying the contents of richtext box with same font

 
0
  #5
Sep 1st, 2008
Originally Posted by LizR View Post
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..
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: copying the contents of richtext box with same font

 
0
  #6
Sep 1st, 2008
Well you said you were copying, the text would need to be selected in the example ive given..
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 27
Reputation: sancti is an unknown quantity at this point 
Solved Threads: 0
sancti sancti is offline Offline
Light Poster

Re: copying the contents of richtext box with same font

 
0
  #7
Sep 1st, 2008
Originally Posted by LizR View Post
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.....
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: copying the contents of richtext box with same font

 
0
  #8
Sep 1st, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC