Using 2 rtf controls would be a doable solution if the following could be 
performed in code:

1. Clear the clipboard of all documents so no confusion can occur.
2. Move the cursor in the first control to the end of the contents.
3. Copy the contents of the second control to the clipboard.
4. Paste the clipboard into the first control, effectively appending.

If this were done correctly the control would do all the work of reorganizing 
everything.

Dennis McGrath

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Lawrence Lustig
Sent: Wednesday, July 15, 2009 9:34 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: combine two blocks of RTF formatted VARCHAR data


<<
I made a very simple Report a few years ago for Karen that manipulated RTF or 
rather converted regular text to formatted text by adding the formatting info 
to the regular text and then concantenating the whole mess by adding the file 
header info and closures.  You will find a whole bunch of info about this 
subject and you're correct, it's non-trivial, but making a plugin to do it is 
OK, but it is still a kludge.  

>>

It's hard enough when you're starting with plain text and encoding it into RTF.

But if you're starting with RTF you have to be aware that the text you get can 
be laced with RTF encoding _inside_ the text.  Without using the RTF control 
itself, it's almost impossible to chop this stuff up and still be sure that the 
bits you extract are still valid RTF (with the right closing codes, and so on). 
 I did something like this once and eventually gave up, using intermediate RTF 
controls to let Microsoft manage the operations on that benighted encoding 
system.  I've never seen a third-party RTF parsing library.

If they were to expose the entire RTF API, it would also be possible to create 
RTF toolbars directly on one's form without having to resort to opening the 
separate editor.
--
Larry


Reply via email to