Click here to Skip to main content
15,905,563 members
Home / Discussions / C#
   

C#

 
AnswerRe: help in web service urgent ? ? ? ? Pin
Giorgi Dalakishvili12-Jul-08 10:17
mentorGiorgi Dalakishvili12-Jul-08 10:17 
AnswerRe: help in web service urgent ? ? ? ? Pin
Pete O'Hanlon12-Jul-08 10:26
mvePete O'Hanlon12-Jul-08 10:26 
QuestionUpdate alternate DNS Pin
jojolili12-Jul-08 2:41
jojolili12-Jul-08 2:41 
Questionrichtext box retaining color information Pin
SHINOJK12-Jul-08 1:43
SHINOJK12-Jul-08 1:43 
AnswerRe: richtext box retaining color information Pin
Elroy Dsilva12-Jul-08 2:18
Elroy Dsilva12-Jul-08 2:18 
GeneralRe: richtext box retaining color information Pin
SHINOJK12-Jul-08 4:15
SHINOJK12-Jul-08 4:15 
GeneralRe: richtext box retaining color information Pin
Elroy Dsilva12-Jul-08 4:26
Elroy Dsilva12-Jul-08 4:26 
GeneralRe: richtext box retaining color information Pin
mav.northwind12-Jul-08 4:59
mav.northwind12-Jul-08 4:59 
Hi!

Since you already do have the vehicle of RTF formatted text, I really don't think that sending text and formatting information separately is a good idea.

Simply appending the Rtf content of one RTB with the content of another one won't work because of the way RTF works.
Basically, it's just regular text starting with {\rtf1 and containing all kinds of formatting tags (similar to html). When you simply append another RTF formatted text, the initial \rtf1 will appear twice, violating the format specification. You can google for the RTF specification if you need further details.

The trick is to use the SelectedRtf property to insert RTF at a given position, like in this example:
// given 2 RTB's named rtb1 and rtb2
string rtb1Content = rtb1.Rtf;
// put the selection at the end of rtb2
rtb2.Select(rtb2.Text.Length, 0);
// insert rtb1's RTF at the current selection in rtb2
rtb2.SelectedRtf = rtb1Content;


Regards,
mav

--
Black holes are the places where God divided by 0...

GeneralRe: richtext box retaining color information Pin
SHINOJK12-Jul-08 6:38
SHINOJK12-Jul-08 6:38 
AnswerRe: richtext box retaining color information Pin
Mostafa Siraj12-Jul-08 5:16
Mostafa Siraj12-Jul-08 5:16 
Questionlosing resolution when using PNG as background image Pin
Mostafa Siraj12-Jul-08 0:11
Mostafa Siraj12-Jul-08 0:11 
AnswerRe: losing resolution when using PNG as background image Pin
User 665812-Jul-08 0:36
User 665812-Jul-08 0:36 
QuestionRe: losing resolution when using PNG as background image Pin
Mostafa Siraj12-Jul-08 1:30
Mostafa Siraj12-Jul-08 1:30 
AnswerRe: losing resolution when using PNG as background image Pin
Gareth H12-Jul-08 1:37
Gareth H12-Jul-08 1:37 
GeneralRe: losing resolution when using PNG as background image Pin
Luc Pattyn12-Jul-08 3:19
sitebuilderLuc Pattyn12-Jul-08 3:19 
GeneralRe: losing resolution when using PNG as background image Pin
User 665812-Jul-08 3:31
User 665812-Jul-08 3:31 
GeneralRe: losing resolution when using PNG as background image Pin
Luc Pattyn12-Jul-08 4:24
sitebuilderLuc Pattyn12-Jul-08 4:24 
AnswerRe: losing resolution when using PNG as background image Pin
Luc Pattyn12-Jul-08 3:21
sitebuilderLuc Pattyn12-Jul-08 3:21 
GeneralRe: losing resolution when using PNG as background image Pin
Mostafa Siraj12-Jul-08 7:31
Mostafa Siraj12-Jul-08 7:31 
GeneralRe: losing resolution when using PNG as background image Pin
Luc Pattyn12-Jul-08 7:38
sitebuilderLuc Pattyn12-Jul-08 7:38 
GeneralRe: losing resolution when using PNG as background image Pin
Mostafa Siraj12-Jul-08 7:47
Mostafa Siraj12-Jul-08 7:47 
GeneralRe: losing resolution when using PNG as background image Pin
Luc Pattyn12-Jul-08 8:28
sitebuilderLuc Pattyn12-Jul-08 8:28 
AnswerRe: losing resolution when using PNG as background image Pin
User 665812-Jul-08 3:28
User 665812-Jul-08 3:28 
GeneralRe: losing resolution when using PNG as background image Pin
Mostafa Siraj12-Jul-08 7:26
Mostafa Siraj12-Jul-08 7:26 
QuestionPassing C# exception through COM to get _com_error Pin
Green Fuze11-Jul-08 22:57
Green Fuze11-Jul-08 22:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.