Board index » delphi » RTF-Text in Paradox load and store from RichEdit-Field

RTF-Text in Paradox load and store from RichEdit-Field

How can I store and restore a formatted Text in Paradox Datafields using a
RichEdit-Component. For example

T01.FieldByName('Test').asString  := Editor.Text
Editor.Text := T01.FieldByName('Test').asString

doesn't work. The Text-Attributes(bold, underline etc.) are lost. I'm using
Delphi4

 

Re:RTF-Text in Paradox load and store from RichEdit-Field


Quote
> How can I store and restore a formatted Text in Paradox Datafields using a
> RichEdit-Component. For example

> T01.FieldByName('Test').asString  := Editor.Text
> Editor.Text := T01.FieldByName('Test').asString

> doesn't work. The Text-Attributes(bold, underline etc.) are lost. I'm using
> Delphi4

Use a BLOB field and stream the components Lines property to a TBlobstream
associated with the field using its SaveToStream property. Use LoadFromStream
to get the text back from the blobstream.

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

Re:RTF-Text in Paradox load and store from RichEdit-Field


Quote
>Gerhard Waldhelm wrote:

>How can I store and restore a formatted Text in Paradox Datafields >using a RichEdit-Component. For example

>T01.FieldByName('Test').asString  := Editor.Text
>Editor.Text := T01.FieldByName('Test').asString

>doesn't work. The Text-Attributes(bold, underline etc.) are lost.

What Paradox fieldtype is your rich text stored in? In any case you
should connect your datafield to a DBRichedit control.

__________
Andreas

Other Threads