Board index » delphi » rtf-text from Memofield to RichEdit??

rtf-text from Memofield to RichEdit??

I have a table with a formatted memofield that contains rtf-text. I must

display and change the text without changing the table. Therefore I want

to copy the (formatted) text into a richedit-component with:

RichEdit.Lines.Add(Table.FieldByName('Memofield').AsString);

but I always get an error message. With plain text this method functions

but with formatted rtf-text it fails.
If I connect the Memofield with a DBRichEdit component the text is
displayed correctly. Is there another way to transfer the contents of
the memofield (rtf-text) into the RichEdit-component.

Thanx for any help

ingo.s...@online.de

 

Re:rtf-text from Memofield to RichEdit??


Quote
> I have a table with a formatted memofield that contains rtf-text. I must
> display and change the text without changing the table. Therefore I want
> to copy the (formatted) text into a richedit-component with:

> RichEdit.Lines.Add(Table.FieldByName('Memofield').AsString);

Attach a TBlobstream to the field and do a richedit.lines.loadfromstream
from the blobstream.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads